Skip to content

PyMC

The pymc pack checks PyMC 6.4.0 probabilistic programming models, MCMC/NUTS (nutpie, Numba, and JAX backends), variational inference, SMC, Gaussian processes, named dimensions (pymc.dims), and posterior predictive sampling on files that import pymc.

Rules Safe fix Unsafe fix Manual fix
7 3 3 1
Rule Severity Fix What it finds
unseeded-sampling error unsafe Unseeded PyMC sampling calls (pm.sample, pm.sample_prior_predictive, pm.sample_posterior_predictive, pm.sample_smc, pm.fit, and pm.draw) default to random_seed=None, producing different MCMC chains, variational fits, or predictive draws on every run.
single-chain-or-unchecked-convergence warning none Running pm.sample or pm.sample_smc with chains=1 (or chains=0) prevents computing split-$\hat{R}$ across independent chains, and compute_convergence_checks=False silently suppresses divergence, treedepth, and low-ESS warnings.
removed-data-container error unsafe pm.MutableData and pm.ConstantData were removed in PyMC 6.0 and raise AttributeError or ImportError.
removed-sd-parameter error safe PyMC distributions removed the legacy sd= parameter in favor of sigma=, so passing sd= raises TypeError.
deprecated-return-inferencedata-false warning unsafe return_inferencedata=False emits FutureWarning in PyMC 6.4.0 and raises an error with nutpie, numpyro, and blackjax NUTS samplers.
deprecated-nuts-sampler-kwargs error safe nuts_sampler_kwargs= is deprecated in PyMC 6.4.0 (FutureWarning) and raises ValueError when combined with nuts=.
deprecated-root-namespace warning safe PyMC 6 relocated math helpers (invlogit, logit, logsumexp), compute_log_prior, exceptions (SamplingError, ShapeError), and PyTensor utilities (gradient, hessian, floatX) out of the root pymc namespace (DeprecationWarning, scheduled for removal in the first PyMC release of 2027).