The watermark at the bottom of the notebook shows it was last executed with PyMC 3.11, so it is not surprising it doesn’t work with 4.x or 5.x versions. We have an issue open to update the notebook, but so far nobody has gotten to it: sampling callback · Issue #112 · pymc-devs/pymc-examples · GitHub. I personally do not now how should one go on fixing it, but if someone is interested in fixing the notebook we can check if someone can help