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)What the rule reports
Section titled “What the rule reports”References to pm.MutableData or pm.ConstantData and imports of MutableData or ConstantData from pymc.
How to fix it
Section titled “How to fix it”Replace MutableData and ConstantData with pm.Data (or pymc.dims.Data when using named dimensions).
Diagnostic message
Section titled “Diagnostic message”$C was removed in PyMC 6 and raises AttributeError. Use $M.Data(...) instead.See all rules in the PyMC pack.