As a general programming tip: build slow and incrementally. Tell your students to test each line they write and try to call pm.draw or pm.sample and see if it errors out (at least early on). It’s much easier to correct yourself because the number of culprits is much smaller. If you write 50x lines of code, call pm.sample and find yourself with an obscure PyTensor error it’s “already too late”.
In your example you would quickly figure out things only fail when either s or y is added, and then only when sigma is specified… and then you found out the problem without even looking at the traceback.