pymc/deprecated-nuts-sampler-kwargs
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| PyMC | error | safe, with xpd check --fix |
PyMC 6.0+ |
nuts_sampler_kwargs= is deprecated in PyMC 6.4.0 (FutureWarning) and raises ValueError when combined with nuts=. Pass NUTS sampler and backend options directly in nuts={...}.
idata = pm.sample(nuts_sampler="nutpie", nuts_sampler_kwargs={"backend": "jax"}, random_seed=0)idata = pm.sample(nuts_sampler="nutpie", nuts={"backend": "jax"}, random_seed=0)What the rule reports
Section titled “What the rule reports”Calls to pm.sample passing nuts_sampler_kwargs= (warning when alone, error when passed alongside nuts=).
How to fix it
Section titled “How to fix it”Rename nuts_sampler_kwargs= to nuts=, or merge its entries into the existing nuts= dictionary.
Diagnostic message
Section titled “Diagnostic message”Passing both nuts_sampler_kwargs= and nuts= to pm.sample raises ValueError in PyMC 6. Merge all NUTS options into nuts={...}.See all rules in the PyMC pack.