Skip to content

pymc/deprecated-return-inferencedata-false

Pack Severity Fix Versions
PyMC warning unsafe, with xpd check --fix --unsafe-fixes PyMC 6.0+

return_inferencedata=False emits FutureWarning in PyMC 6.4.0 and raises an error with nutpie, numpyro, and blackjax NUTS samplers. PyMC 6 returns an ArviZ-compatible xarray.DataTree by default.

trace = pm.sample(draws=1000, random_seed=0, return_inferencedata=False)
idata = pm.sample(draws=1000, random_seed=0, return_inferencedata=True)

Calls to pm.sample, pm.sample_prior_predictive, pm.sample_posterior_predictive, pm.sample_smc, or pm.find_MAP with return_inferencedata=False.

Remove return_inferencedata=False (or pass return_inferencedata=True) and read posterior arrays from the returned xarray.DataTree.

return_inferencedata=False is deprecated in PyMC 6 and raises with nutpie, numpyro, and blackjax samplers. Keep the default DataTree output (return_inferencedata=True).

See all rules in the PyMC pack.