Shape mismatch error for out of sample inference

The reason it broke is that you defined it with a static shape, based on covariates, instead of a dynamic one based on covars_data, so PyMC wouldn’t resize it after you updated the MutableData.

But it wouldn’t make sense to have a RV size change between sample and posterior predictive, as it would be unclear how to reuse the psoterior inferences (pymc would end up sampling the posterior predictive of that RV as well, which in you case would be a prior draw from the distribution)