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
The existing checks assume the same model is used between sample and sample_posterior_predictive, in which case the only variable that can be changed are mutable ones.
importpymcaspmwithpm.Model() asm:
x=pm.ConstantData("x", [0, 0, 0, 0, 0, 0])
b=pm.Normal("b", x)
y=pm.Normal("y", b.sum(), observed=0)
idata=pm.sample()
withpm.Model() aspred_m:
x=pm.ConstantData("x", [0, 0, 0])
# x = pm.MutableData("x", [0, 0, 0]) # This works fineb=pm.Normal("b", x)
y=pm.Normal("y", b.sum(), observed=0)
idata=pm.sample_posterior_predictive(idata, predictions=True,) # Fails because b isn't resampled
A similar thing happens for variables whose dims are changed. If they were defined in coords_mutable it will resample correctly, but not if they were defined as vanilla "constant" coords