Skip to content

Commit 6b3bda0

Browse files
lucianopazricardoV94
authored andcommitted
Ensure sequential sampling does not leak sampling state across chains
1 parent 028b801 commit 6b3bda0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pymc/sampling/mcmc.py

+2
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,9 @@ def _sample_many(
10681068
step: function
10691069
Step function
10701070
"""
1071+
initial_step_state = step.sampling_state
10711072
for i in range(chains):
1073+
step.sampling_state = initial_step_state
10721074
_sample(
10731075
draws=draws,
10741076
chain=i,

0 commit comments

Comments
 (0)