Perform model fit evaluation in Bayesian way when sampling from the custom distribution is not known

If you can’t find a way to generate random draws directly you can use mcmc. This should work fine for prior predictive (just remove the observed kwarg and call pm.sample).

For posterior predictive it’s trickier because you want to take a draw for every posterior draw you got. You could rewrite your model now passing the posterior draws as constants and do a new “pm.sample” which would correspond to a posterior predictive.