Skip to content
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

remove extra copy of log-likelihood in NumPyroConverter #2347

Merged
merged 1 commit into from
May 10, 2024

Conversation

andrewdipper
Copy link
Contributor

@andrewdipper andrewdipper commented May 5, 2024

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).

  • Follows official PR format
  • Code style correct (follows pylint and black guidelines)

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

Copy link

codecov bot commented May 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andrewdipper
Copy link
Contributor Author

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
Copy link
Member

It looks like you want to change the library default too: #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.

Copy link
Member

@OriolAbril OriolAbril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, would be great to have some input from someone more familiar with numpyro. cc @fehiepsi maybe?

Copy link
Member

@fehiepsi fehiepsi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @andrewdipper!

@OriolAbril OriolAbril merged commit 0f71f9e into arviz-devs:main May 10, 2024
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants