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 Jan 9, 2025
1 parent c3fb82a commit 3953ccc
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 3953ccc

Please sign in to comment.