So after testing pytensor.gradient.verify_grad I see that if I set the tolerance to 1e-7 I get:
GradientError: GradientError: numeric gradient and analytic gradient exceed tolerance:
At position 0 of argument 5 with shape (),
val1 = 22120.189872 , val2 = 22120.179274
abs. error = 0.010598, abs. tolerance = 0.000000
rel. error = 0.000000, rel. tolerance = 0.000000
Exception args:
As far as prior predictive checks, I believe this has already been done in Octofitter.
Does this mean I should make a custom gradient?