You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After creating a model that uses pm.Data objects for all data inputs, using set_data following sampling to swap in new predictor values for prediction results in an AttributeError
---------------------------------------------------------------------------AttributeErrorTraceback (mostrecentcalllast)
<ipython-input-67-459704977541>in<module>()
1withage_model:
---->2pm.set_data({"age_ind": nola.age.values-20})
3post_pred=pm.sample_posterior_predictive(trace)
1frames/usr/local/lib/python3.7/dist-packages/pymc/model.pyinset_data(new_data, model)
17591760forvariable_name, new_valueinnew_data.items():
->1761model.set_data(variable_name, new_value)
17621763/usr/local/lib/python3.7/dist-packages/pymc/model.pyinset_data(self, name, values, coords)
1175# NOTE: If there are multiple pm.MutableData containers sharing this dim, but the user only1176# changes the values for one of them, they will run into shape problems nonetheless.->1177length_belongs_to=length_tensor.owner.inputs[0].owner.inputs[0]
1178ifnotisinstance(length_belongs_to, SharedVariable) andlength_changed:
1179raiseShapeError(
AttributeError: 'NoneType'objecthasnoattribute'inputs'
Versions and main components
PyMC/PyMC3 Version: 4.0.0b2
Aesara/Theano Version: 2.3.4
Python Version: 3.7.12
Operating system: Linux (Colab)
How did you install PyMC/PyMC3: pip
The text was updated successfully, but these errors were encountered:
This appears to be due to my using a dims argument on the original Data which does not correspond to the new data. At any rate, there should be a more informative error message here.
Uh oh!
There was an error while loading. Please reload this page.
Description of your problem
After creating a model that uses
pm.Data
objects for all data inputs, usingset_data
following sampling to swap in new predictor values for prediction results in anAttributeError
Please provide the full traceback.
Complete error traceback
Versions and main components
The text was updated successfully, but these errors were encountered: