-
-
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
Support PyTensor deterministic operations as observations #7656
base: main
Are you sure you want to change the base?
Conversation
We need to tell InferenceData converter how to get the data values to put in |
I don't consider this a bugfix, it's behavior that was explicitly forbidden for conservative reasons (more like a NotImplementedError) |
Where does this happen in the code? |
I think the MiniBatch tests will still fail. Any thoughts on how that should behave? |
Also, feel free to choose a better title! I couldn't express it too well |
scale = 12 | ||
scaled_target = target / scale | ||
mu = pm.Normal("mu", mu=0, sigma=1) | ||
pm.Normal("x", mu=mu, sigma=1, observed=scaled_target) |
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.
Should I sample this to check that it has the correct data in the InferenceData?
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.
No, we have more direct ways of testing it
Line 63 in fa43eba
Line 152 in fa43eba
We should be able to just use constant_fold (also in pytensor) for it |
I have an implementation before this suggestion. I need a little help understanding this. Feel free to put suggestion |
What do you mean? My suggestion is to simply call constant_fold on the observed variable |
Description
Will need some help on this implementation and how to best test this.
Related Issue
Checklist
Type of change
📚 Documentation preview 📚: https://pymc--7656.org.readthedocs.build/en/7656/