-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Added theano.gof.graph.Constant into the type checks done in distributions.py #3599
Conversation
With all due respect, I think this calls out the problem thatt we don't have a clear statetment of what datta types can be in our networks and counted as variables. This causes us to have lots of duplicate if-then-else's that are prone to incompleteness...
in my code, but AFAICT there is no such assertion I can make. |
You are right that we are leaving many types out of our checks in |
I agree that we should be able to deal with anything that can be thrown at us, but it's impossible to do that with any assurance unless we know what can be thrown at us, and speaking as a new-to-PyMC3 developer, I don't have that knowledge, and seems like I get it only by trial and error. In particular, given a model, |
I also got most of this from trial and error and some source code inspection. The type hints you are adding are very helpful! |
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.
lgtm
@lucianopaz if you can identify groups of types that should always be checked together, you could put them as a tuple somewhere. No need for a custom type hierarchy.. |
Thanks for the idea @michaelosthege, I'll group the two kinds of constants in a tuple in vartypes and then merge |
This closes #3595