Sample: Fix PyMC posterior extraction for newer ArviZ#1714
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1714 +/- ##
===========================================
- Coverage 84.27% 79.00% -5.27%
===========================================
Files 164 164
Lines 14636 14642 +6
===========================================
- Hits 12334 11568 -766
- Misses 2302 3074 +772 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dilpath
left a comment
There was a problem hiding this comment.
Looks good, thanks! Is there a good reason for supporting older versions of arviz? Otherwise I would suggest to just drop support.
Yeah I was considering dropping it, but I thought it might cause a too sharp update? |
Agreed, deprecation would be ideal. However, I don't see a strong need for it. This PR change is not user-facing and won't break their workflows directly. |
Hmm actually a deprecation warning is not appropriate here, since this is not pyPESTO API usage but compatibility with a dependency version. I added a small code comment noting that this branch can be simplified once we bump the minimum supported ArviZ version. |
Right, and for me it would be fine to bump the requirement already due to this PR. |
Makes sense, better to just do it, no reason to wait. |
- Use Python-version-specific ArviZ requirements so Python 3.11 installs ArviZ 0.x while Python 3.12+ uses ArviZ 1.1+ - Keep PyMC posterior extraction on the common posterior interface shared by old and new ArviZ result objects
|
I checked this more closely and I think we cannot fully just bump here yet.
That is why I kept the split for now:
I added a TODO in |
|
Tests are failing, but should be solved by #1717, independent problem (pyswarm support), will merge now. |
Newer PyMC/ArviZ/xarray versions changed some objects returned by sampling and variational inference. This caused tests to fail.
This PR updates the PyMC interfaces to handle those changes:
posteriorwhen ArviZ/xarray returns it as aDataTreegroupThis should fix the PyMC sampling pipeline and variational inference pipeline with current dependency versions.