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 22, 2024
1 parent 2190649 commit 069ae75
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)

Check warning on line 1305 in pymc/sampling/mcmc.py

View check run for this annotation

Codecov / codecov/patch

pymc/sampling/mcmc.py#L1305

Added line #L1305 was not covered by tests
trace.close()
Expand Down

0 comments on commit 069ae75

Please sign in to comment.