Debug mode in PyTensor

Did you try model.debug() as @ricardoV94 suggested? This should reveal the most common problems in models without having to interact with the backend. I also didn’t even get a pytensor error on your example. What kinds of models are you planning to show students that you’re getting errors on?