-
Notifications
You must be signed in to change notification settings - Fork 1
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
Upgrades to PyMC compatibility #61
Conversation
9da6c66
to
52c8060
Compare
52c8060
to
682a410
Compare
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov Report
@@ Coverage Diff @@
## master #61 +/- ##
==========================================
- Coverage 97.49% 97.23% -0.26%
==========================================
Files 6 7 +1
Lines 919 905 -14
==========================================
- Hits 896 880 -16
- Misses 23 25 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
da70e86
to
1ffaed8
Compare
1ffaed8
to
ffab326
Compare
928a726
to
b1b38f1
Compare
This also refactors the way how log-likelihood graphs are created, because the API for that changed between v4 and v5. Also re-runs some example notebooks.
b1b38f1
to
47c3c7c
Compare
omg, finally it's green 😌 |
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.
Looks like A LOT of work. I haven't checked the notebooks yet since this is nasty in the browser. Will do so locally tomorrow.
calibr8/core.py
Outdated
if pm.__version__[0] == "4": | ||
return pm.joint_logp(rv, y, sum=True) | ||
elif int(pm.__version__[0]) >= 5: | ||
return pm.logprob.joint_logprob({rv: y_tensor}, sum=True) |
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.
So in PyMC v5 this is only working with tensor inputs?
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.
Yes, the previous pm.joint_logp
was a wrapper that apparently did this automatically..
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.
I also reviewed the notebooks. The deprecation warning are not so nice, but since you have a watermark showing the PyMC version, this should be fine.
b289da4
to
035135f
Compare
035135f
to
b08a42d
Compare
if unexpected_rv_nodes: | ||
raise ValueError( | ||
f"Random variables detected in the logp graph: {unexpected_rv_nodes}.\n" | ||
"This can happen when DensityDist logp or Interval transform functions " |
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.
I am not sure anybody except you or maybe me could fix this in case of an error, but I guess that's ok.
Major changes
pymc3
compatibilitypymc==4.4.0
pymc==5.0.0
Maintenance