Skip to content

Commit 472da97

Browse files
fix: deep copy nuts_sampler_kwarg to prevent .pop side effects (#7652)
1 parent fa43eba commit 472da97

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pymc/sampling/mcmc.py

+1
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ def _sample_external_nuts(
338338
UserWarning,
339339
)
340340
compile_kwargs = {}
341+
nuts_sampler_kwargs = nuts_sampler_kwargs.copy()
341342
for kwarg in ("backend", "gradient_backend"):
342343
if kwarg in nuts_sampler_kwargs:
343344
compile_kwargs[kwarg] = nuts_sampler_kwargs.pop(kwarg)

0 commit comments

Comments
 (0)