ValueError: Random variables detected in the logp graph - what does it mean?

Thanks @ricardoV94 !

After fixing ri using your suggestion, the model now correctly runs.
No divergences and a few minutes of sampling for T=300 and 1000+1000 samples.

There was a model sometime ago, where each step was a posterior update, and if your model is similar it still isn’t easy to implement in PyMC: Behrens’ Bayesian Learner Model : How to share parameters between steps? - #45 by ricardoV94

Yes, it is exactly the same model!!
I didn’t expect to find it here :slight_smile:
I’ll have a look at the thread and see if I can implement also the “Beta random walk” as reported in the paper.

I had actually implemented the original model in PyMC using a naive approach with a for loop for both the v and r variable but the result was too slow. With T=300, creating 300 different v and 300 different r resulted in a “build time” (the time between the pm.sample invocation and when the sample process actually start) to become larger than 48 hours… a bit too long :slight_smile:
It was also complaining a lot about divergences (but I hadn’t done parameter tuning, so maybe that was the problem).