There is no way to make it static unless you pass it as givens or input (hence the need for the custom/ separate sampler). Otherwise a RV in a Aesara graph would evaluate to a new value everytime it’s called.
Having said that, there should be no problem if the variable is sampled separately. Simulator provides such a type of stochastic logp and Metropolis seems happy with it.
On another note, we definitely want to add some simple step method that simply takes random draws from a graph, for example to perform conjugate sampling (or the case raised in this issue). I just haven’t had the time to write something up ![]()