-
-
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
Fix need for dummy data in sample_posterior_predictive
#7265
Conversation
94cc61d
to
309139b
Compare
sample_posterior_predictive
@@ -454,7 +454,7 @@ def test_constant_data(self, use_context): | |||
test_dict = { | |||
"posterior": ["beta"], | |||
"observed_data": ["obs"], | |||
"constant_data": ["x", "y", "beta_sigma"], | |||
"constant_data": ["x", "beta_sigma"], |
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.
This y
was in fact observed data... Now nothing stops the user from using y
both as observed data and constant data, so I am not sure we want to truly remove it.
We can check if y
shows up in the generative graph.
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.
doing it now
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
This avoids needing to set dummy observed data when doing sample_posterior_predictive when that is not part of the generative graph.
Let's get this merged? The CI failure looks unrelated. |
Description
Fix arviz backend find_constants
This also fixes a bug when doing sample_posterior_predictive with resized X data, where the old unused Y data would be retrieved and a dimension mismatch would crop up, unless a dummy Y was set prior to sampling.
Related Issue
Checklist
Type of change
📚 Documentation preview 📚: https://pymc--7265.org.readthedocs.build/en/7265/