Skip to content

pymc/deprecated-root-namespace

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

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).

p = pm.invlogit(eta)
p = pm.math.invlogit(eta)
prior_ll = pm.compute_log_prior(idata)
prior_ll = pm.stats.compute_log_prior(idata)

Attribute lookups on pm or pymc targeting symbols relocated in pymc._deprecations (pymc.math, pymc.stats, pymc.exceptions, and pymc.pytensorf).

Reference each symbol from its canonical submodule (pm.math.*, pm.stats.*, pm.exceptions.*, or pm.pytensorf.*).

$M.$NAME moved out of the pymc root namespace in PyMC 6 and will be removed in 2027. Use $M.math.$NAME instead.

See all rules in the PyMC pack.