-
Notifications
You must be signed in to change notification settings - Fork 131
Make zip strict #840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make zip strict #840
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obviously the original author assumed these could never be different length (and I see why he thought so). Judging by the test, the errors comes from not enough arguments being passed to RV. Is there no way to directly check that? The error generated by the zip would not give much guidance to how to debug the issue relative to something like f"NormalRV expected 2 inputs, got {len(inputs): {", ".join([str(x) for x in inputs])"
There is but I was hoping my lazy fix would fly under the radar. Well it did not :D |
Even if you add a more specific input check, zip should probably still be strict as a last line of defense. So the lazy solution is not implemented in vein! |
That gives me little solace but thank you :D. Mondays are the worst |
Are we interested in a PR making all the zips strict (or explicitly non-strict)? It's a ruff rule that is not enabled for PyTensor: https://docs.astral.sh/ruff/rules/zip-without-explicit-strict/ |
Maybe, do you like it? |
No, I love it |
Closing in favor of #850 |
Description
Subtle bug showed up in pymc-devs/pymc#7370 where a RandomVariable had a wrong signature