Skip to content

Commit

Permalink
Minor mcmc code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lucianopaz committed Dec 23, 2024
1 parent 28d7bd4 commit 9f4c013
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pymc/sampling/mcmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1300,12 +1300,7 @@ def _iter_sample(
)

yield diverging
except KeyboardInterrupt:
if isinstance(trace, ZarrChain):
trace.record_sampling_state(step=step)
trace.close()
raise
except BaseException:
except (KeyboardInterrupt, BaseException):
if isinstance(trace, ZarrChain):
trace.record_sampling_state(step=step)
trace.close()
Expand Down

0 comments on commit 9f4c013

Please sign in to comment.