To directly answer your question, it might be that the initial value chosen automatically when you call pm.sample doesn’t produce valid values. You can set initial values for all your distributions by adding a initval= argument. The sampling will begin from that point, so you could use an initial point you are sure will work. Note that this argument was depreciated in PyMC v4, if you decide to upgrade (it’s recommended).
It might also be related to the fact that the beta distribution disallows the end points for certain combinations of parameters. So if your IoUs have values of exactly 0.0 or 1.0, (which is very likely for IoU of random samples) it will have a logpdf of -inf and you will get this error. Testing a Beta(4, 1), the logpdf of 0.0 is indeed -inf.
But something about the approach more fundamentally seems off to me though, like you’re mixing together two concepts. Why model the data generating process of a model evaluation metric, like IoU, rather than the process that generated the data itself? It’s an additional unnecessary step. I don’t know what the output of theano_fem_solver is, but you could assume the process is centered on the dynamics of the PDE, plus some iid normally distributed noise (or what have you), then use Ts_observed directly as data. You would compute the distribution over model IoU using posterior predictive samples “for free”, after you obtain a data generating process.
Since geography is involved, you might also use the PDE as the mean of some kind of spatial process, so the likelihood function would be multivariate normal with some covariance function.