-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Allow passing dims to Potential and Deterministic #6576
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
Conversation
Thanks @Raj-Parekh24 Can you add a test that confirms dims are saved in "model.named_vars_to_dims”? There must be a test that already checks this for deterministics, so you can put it nearby (probably in test_model.py). |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6576 +/- ##
==========================================
+ Coverage 84.45% 92.01% +7.55%
==========================================
Files 91 92 +1
Lines 15108 15535 +427
==========================================
+ Hits 12760 14294 +1534
+ Misses 2348 1241 -1107
|
Sure @ricardoV94 , I will look into it and add appropriate test case. |
Hi @ricardoV94, Added test case "test_potential_with_dims" to check the dims passing to Potential please review it. |
""" | ||
with pm.Model(coords={"observed": range(10)}) as model: | ||
x = pm.Normal("x", 0, 1) | ||
y = pm.Deterministic("y", x**2, dims=("observed",)) |
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 test does not use Potential
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.
Thank you for the review @michaelosthege
Sorry for this,
I found that dims test case was not available for deterministic as well so added that test case along with potential.
I might forget to update the test case for potential.
I have updated the code.
Please review it.
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.
Thanks @Raj-Parekh24
What is this PR about?
Closes #6544.
Checklist
Major / Breaking Changes
New features
Bugfixes
Documentation
Maintenance