-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
Fixing unreasonable memory usage when creating an InferenceData object from an emcee sampler #2215
Conversation
The goal of this chang is to prevent large memory consumption during the creation of an InferenceData object from emcee. The change also improves efficiency.
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.
left two minor comments about using from_emcee
to keep the changelog user friendly (hopefully) as users don't need to know about io_emcee, also rename chain
to samples_ary
as that array contains samples from all chains.
Approving already though, that was a very good catch, thanks!
Codecov Report
@@ Coverage Diff @@
## main #2215 +/- ##
=======================================
Coverage 89.89% 89.90%
=======================================
Files 120 120
Lines 12423 12426 +3
=======================================
+ Hits 11168 11171 +3
Misses 1255 1255
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Thanks ! :) |
https://build.opensuse.org/request/show/1073712 by user dgarcia + dimstar_suse - skip python 3.11 and python 3.8 because some dependencies doesn't support that python versions - Update to 0.15.1 - Fix memory usage and improve efficiency in `from_emcee` ([2215](arviz-devs/arviz#2215)) - Lower pandas version needed ([2217](arviz-devs/arviz#2217)) - 0.15.0 - Adds Savage-Dickey density ratio plot for Bayes factor approximation. ([2037](arviz-devs/arviz#2037), [2152](arviz-devs/arviz#2152)) - Add `CmdStanPySamplingWrapper` and `PyMCSamplingWrapper` classes ([2158](arviz-devs/arviz#2158)) - Changed dependency on netcdf4-python to h5netcdf ([2122](arviz-devs/arviz#2122)) - Fix `reloo` outdate
Description
The goal of this change is to prevent large memory consumption during the creation of an InferenceData object from emcee. The change also improves efficiency.
Previously, the full chain was initialized once for each of the variables, leading to long initialization time and a spike in memory usage (my 2.5Gb chain with ~30 dimensions led to 60+Gb of allocated memory, crashing the python process).
Checklist
📚 Documentation preview 📚: https://arviz--2215.org.readthedocs.build/en/2215/