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
---------------------------------------------------------------------------AttributeErrorTraceback (mostrecentcalllast)
/home/tim/Master/prototyping/TutorialsAndArchive/test_stuff.ipynbCell1' in<cellline: 13>()
[12](vscode-notebook-cell:/home/tim/Master/prototyping/TutorialsAndArchive/test_stuff.ipynb#ch0000000?line=11) obs = pm.Normal("obs",mu=mu,sigma=sigma,observed=x)
[13](vscode-notebook-cell:/home/tim/Master/prototyping/TutorialsAndArchive/test_stuff.ipynb#ch0000000?line=12) with model:---> [14](vscode-notebook-cell:/home/tim/Master/prototyping/TutorialsAndArchive/test_stuff.ipynb#ch0000000?line=13) pm.set_data({"x":x_new},coords=coords)File~/Master/prototyping/repos/pymc/pymc/model.py:1770, inset_data(new_data, model, coords)
[1767](file:///home/tim/Master/prototyping/repos/pymc/pymc/model.py?line=1766) model=modelcontext(model)
[1769](file:///home/tim/Master/prototyping/repos/pymc/pymc/model.py?line=1768) forvariable_name, new_valueinnew_data.items():
-> [1770](file:///home/tim/Master/prototyping/repos/pymc/pymc/model.py?line=1769) model.set_data(variable_name, new_value, coords=coords)
File~/Master/prototyping/repos/pymc/pymc/model.py:1182, inModel.set_data(self, name, values, coords)
[1177](file:///home/tim/Master/prototyping/repos/pymc/pymc/model.py?line=1176) length_changed=new_length!=old_length
[1179](file:///home/tim/Master/prototyping/repos/pymc/pymc/model.py?line=1178) # Reject resizing if we already know that it would create shape problems.
[1180](file:///home/tim/Master/prototyping/repos/pymc/pymc/model.py?line=1179) # NOTE: If there are multiple pm.MutableData containers sharing this dim, but the user only
[1181](file:///home/tim/Master/prototyping/repos/pymc/pymc/model.py?line=1180) # changes the values for one of them, they will run into shape problems nonetheless.-> [1182](file:///home/tim/Master/prototyping/repos/pymc/pymc/model.py?line=1181) length_belongs_to=length_tensor.owner.inputs[0].owner.inputs[0]
[1183](file:///home/tim/Master/prototyping/repos/pymc/pymc/model.py?line=1182) ifnotisinstance(length_belongs_to, SharedVariable) andlength_changed:
[1184](file:///home/tim/Master/prototyping/repos/pymc/pymc/model.py?line=1183) raiseShapeError(
[1185](file:///home/tim/Master/prototyping/repos/pymc/pymc/model.py?line=1184) f"Resizing dimension '{dname}' with values of length {new_length} would lead to incompatibilities, "
[1186](file:///home/tim/Master/prototyping/repos/pymc/pymc/model.py?line=1185) f"because the dimension was initialized from '{length_belongs_to}' which is not a shared variable. "
(...)
[1190](file:///home/tim/Master/prototyping/repos/pymc/pymc/model.py?line=1189) expected=old_length,
[1191](file:///home/tim/Master/prototyping/repos/pymc/pymc/model.py?line=1190) )
AttributeError: 'NoneType'objecthasnoattribute'inputs'
Please provide any additional information below.
I made a little fix for me and will publish it in a PR.
Versions and main components
PyMC/PyMC3 Version: 4.0.0b6 (ab593b)
Aesara/Theano Version: 2.6.6
Python Version: 3.10
Operating system: Ubuntu 20.04
How did you install PyMC/PyMC3: (conda/pip) pip -e
The text was updated successfully, but these errors were encountered:
When I use custom coords for a model, resetting data in a shared variable fails.
Please provide a minimal, self-contained, and reproducible example.
Please provide the full traceback.
Please provide any additional information below.
I made a little fix for me and will publish it in a PR.
Versions and main components
The text was updated successfully, but these errors were encountered: