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
When a dimension is left unnamed, pymc will auto generate the dimension's name based on the tensor's name and the axis number. The problem is that pymc.sample_posterior_predictive returns a dimension name that is not aligned with what one gets in the observed_data group.
Reproduceable code example:
importpymcaspmwithpm.Model():
a=pm.Normal("a")
b=pm.Normal("b", a, observed=[-1, 2, 4])
idata=pm.sample()
idata.extend(pm.sample_prior_predictive())
idata=pm.sample_posterior_predictive(idata, extend_inferencedata=True)
assertidata.observed_data.b.dims==idata.prior_predictive.b.dims[2:] # This works!assertidata.observed_data.b.dims==idata.posterior_predictive.b.dims[2:] # This fails
Error message:
It's a simple `AssertionError`. The telling thing is that the posterior predictive group gets a wrong imputed name because it doesn't ignore the chain and draw dimensions
>>> print(idata.observed_data.b.dims, idata.prior_predictive.b.dims, idata.posterior_predictive.b.dims)
('b_dim_0',) ('chain', 'draw', 'b_dim_0') ('chain', 'draw', 'b_dim_2')
PyMC version information:
PyMC main
Context for the issue:
No response
The text was updated successfully, but these errors were encountered:
Describe the issue:
When a dimension is left unnamed,
pymc
will auto generate the dimension's name based on the tensor's name and the axis number. The problem is thatpymc.sample_posterior_predictive
returns a dimension name that is not aligned with what one gets in theobserved_data
group.Reproduceable code example:
Error message:
PyMC version information:
PyMC main
Context for the issue:
No response
The text was updated successfully, but these errors were encountered: