Skip to content

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)

Calls to pm.sample passing nuts_sampler_kwargs= (warning when alone, error when passed alongside nuts=).

Rename nuts_sampler_kwargs= to nuts=, or merge its entries into the existing nuts= dictionary.

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.