Skip to content

Commit

Permalink
Ensure sequential sampling does not leak sampling state across chains
Browse files Browse the repository at this point in the history
lucianopaz authored and ricardoV94 committed Jan 7, 2025
1 parent 028b801 commit 6b3bda0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pymc/sampling/mcmc.py
Original file line number Diff line number Diff line change
@@ -1068,7 +1068,9 @@ def _sample_many(
step: function
Step function
"""
initial_step_state = step.sampling_state
for i in range(chains):
step.sampling_state = initial_step_state
_sample(
draws=draws,
chain=i,

0 comments on commit 6b3bda0

Please sign in to comment.