Skip to content

Commit

Permalink
actual actual bugfix for tracing reenablement in module stmt
Browse files Browse the repository at this point in the history
  • Loading branch information
smacke committed Dec 6, 2023
1 parent 72ca706 commit 79525de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/ipyflow/tracing/ipyflow_tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1480,6 +1480,9 @@ def _try_reenable_tracing(
)
if not is_module_stmt and tracing_reenabled_call_stack_length == -1:
return False
tracing_reenabled_call_stack_length = max(
tracing_reenabled_call_stack_length, 0
)
assert tracing_reenabled_call_stack_length <= len(self.call_stack)
while len(self.call_stack) > tracing_reenabled_call_stack_length:
self.call_stack.pop()
Expand Down

0 comments on commit 79525de

Please sign in to comment.