"clamping" variables for debugging

To debug a complicated multi-layer model, it would be nice if I could create it and then “clamp” some of the variables to specific values before sampling. Is that possible in some way? Otherwise, it seems like I need to hack the code a lot (in a way that for me, at least is error-prone) in order to probe its behavior.


There is no out of the box way to do this. One way is to create a custom step-method that just assign a specific values to some RVs, and PyMC3 generate the conditional logp internally and sample from it.