arviz-devs / arviz

Exploratory analysis of Bayesian models with Python
https://python.arviz.org
Apache License 2.0
1.56k stars 386 forks source link

remove extra copy of log-likelihood in NumPyroConverter #2347

Closed andrewdipper closed 1 month ago

andrewdipper commented 2 months ago

Removes extra copy to reduce memory requirements for large models/datasets. If the copy is desirable for a reason I missed feel free to delete this. Let me know if any changes are needed

As a side note the default automatic numpyro log-likelihood calculation was a bit of a surprise (as far as unexpected memory explosions go).


📚 Documentation preview 📚: https://arviz--2347.org.readthedocs.build/en/2347/

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.84%. Comparing base (cfbfbeb) to head (bb33953).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2347 +/- ## ======================================= Coverage 86.84% 86.84% ======================================= Files 123 123 Lines 12745 12745 ======================================= Hits 11068 11068 Misses 1677 1677 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

andrewdipper commented 2 months ago

Also I realize the checks don't pass but it looks like some sort of conda environment failure. I'm not sure what to do about that, thanks

OriolAbril commented 1 month ago

It looks like you want to change the library default too: https://github.com/arviz-devs/arviz/issues/2155. In the meantime you can create an rcfile so False is the default for you, https://oriolabrilpla.cat/en/blog/posts/2020/rcParams.html is a bit old but it should help, rcParams haven't changed much.