Skip to content

pymc/removed-data-container

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

pm.MutableData and pm.ConstantData were removed in PyMC 6.0 and raise AttributeError or ImportError. Both were unified into pm.Data.

x = pm.MutableData("x", X_train)
x = pm.Data("x", X_train)
y = pm.ConstantData("y", y_train)
y = pm.Data("y", y_train)

References to pm.MutableData or pm.ConstantData and imports of MutableData or ConstantData from pymc.

Replace MutableData and ConstantData with pm.Data (or pymc.dims.Data when using named dimensions).

$C was removed in PyMC 6 and raises AttributeError. Use $M.Data(...) instead.

See all rules in the PyMC pack.