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
KeyError: "Dimensions {'dim'} are unknown to the model and cannot be used to specify a `size`."
KeyErrorTraceback (mostrecentcalllast)
<ipython-input-2-c89cca9d3d36>in<module>5b=pm.Normal("b")
6c=pm.HalfNormal("c")
---->7d=pm.Normal("d", b, c, dims="dim")
8e=pm.Normal("e", a+d, dims="dim")
9~/repos/pymc3/pymc/distributions/distribution.pyin__new__(cls, name, rng, dims, initval, observed, total_size, transform, *args, **kwargs)
251# Create the RV and process dims and observed to determine252# a shape by which the created RV may need to be resized.-->253rv_out, dims, observed, resize_shape=_make_rv_and_resize_shape(
254cls=cls, dims=dims, model=model, observed=observed, args=args, rng=rng, **kwargs255 )
~/repos/pymc3/pymc/distributions/distribution.pyin_make_rv_and_resize_shape(cls, dims, model, observed, args, **kwargs)
160ifdimsisnotNone:
161ifdims_can_resize:
-->162resize_shape, dims=resize_from_dims(dims, ndim_actual, model)
163elifEllipsisindims:
164# Replace ... with None entries to match the actual dimensionality.~/repos/pymc3/pymc/distributions/shape_utils.pyinresize_from_dims(dims, ndim_implied, model)
518unknowndim_resize_dims=set(dims[:ndim_resize]) -set(model.dim_lengths)
519ifunknowndim_resize_dims:
-->520raiseKeyError(
521f"Dimensions {unknowndim_resize_dims} are unknown to the model and cannot be used to specify a `size`."522 )
KeyError: "Dimensions {'dim'} are unknown to the model and cannot be used to specify a `size`."
Please provide any additional information below.
Versions and main components
PyMC/PyMC3 Version: 4.0.0b1
Aesara/Theano Version: 2.3.2
Python Version: 3.9.7
Operating system: Mac
How did you install PyMC/PyMC3: (conda/pip) pip
The text was updated successfully, but these errors were encountered:
Description of your problem
Based off of this discussion, nested models should share their coordinates, but they don't at the moment, which leads to this error
Please provide the full traceback.
KeyError: "Dimensions {'dim'} are unknown to the model and cannot be used to specify a `size`."
Please provide any additional information below.
Versions and main components
The text was updated successfully, but these errors were encountered: