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

Fix pickle issues in MCMC posterior + test #1291

Merged
merged 2 commits into from
Oct 25, 2024
Merged

Fix pickle issues in MCMC posterior + test #1291

merged 2 commits into from
Oct 25, 2024

Conversation

manuelgloeckler
Copy link
Contributor

What does this implement/fix? Explain your changes

This PR address the issue of the MCMCPosterior not being pickable after running sample.

Does this close any currently open issues?

Fixes #1278

Any other comments?

Extended the save and load tests to be performed after calling sample and log_prob once.

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.43%. Comparing base (428fc93) to head (56c6a5e).
Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1291       +/-   ##
===========================================
- Coverage   89.30%   78.43%   -10.87%     
===========================================
  Files         119      119               
  Lines        8721     8732       +11     
===========================================
- Hits         7788     6849      -939     
- Misses        933     1883      +950     
Flag Coverage Δ
unittests 78.43% <100.00%> (-10.87%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sbi/inference/posteriors/mcmc_posterior.py 86.14% <100.00%> (-0.55%) ⬇️

... and 31 files with indirect coverage changes

Copy link
Contributor

@janfb janfb left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for fixing this 🙌

@janfb janfb merged commit 18b1141 into main Oct 25, 2024
6 checks passed
@janfb janfb deleted the fix_nle_pickability branch October 25, 2024 13:52
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.

MCMCPosterior not pickable after vectorized slice sampling
2 participants