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

expose batched sampling option; error handling #1321

Merged
merged 3 commits into from
Dec 13, 2024

Conversation

janfb
Copy link
Contributor

@janfb janfb commented Dec 3, 2024

fixes #1320

  • exposes use_batched_sampling in run_tarp
  • catch AssertianError raised in MCMCPosterior when using batched sampling with something else than slice_np_vectorized
  • add warning when sampling for a batch of x without batched sampling.

@janfb janfb self-assigned this Dec 3, 2024
@janfb janfb requested a review from michaeldeistler December 3, 2024 17:02
@janfb janfb added the bug Something isn't working label Dec 3, 2024
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.65%. Comparing base (3bd8aa9) to head (4c69fa4).
Report is 4 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1321       +/-   ##
===========================================
- Coverage   89.39%   78.65%   -10.74%     
===========================================
  Files         118      118               
  Lines        8709     8722       +13     
===========================================
- Hits         7785     6860      -925     
- Misses        924     1862      +938     
Flag Coverage Δ
unittests 78.65% <100.00%> (-10.74%) ⬇️

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

Files with missing lines Coverage Δ
sbi/diagnostics/sbc.py 95.71% <ø> (ø)
sbi/diagnostics/tarp.py 82.92% <ø> (-14.64%) ⬇️
sbi/utils/diagnostics_utils.py 100.00% <100.00%> (+4.00%) ⬆️

... and 31 files with indirect coverage changes

Copy link
Contributor

@michaeldeistler michaeldeistler left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@janfb janfb merged commit d3f22b5 into main Dec 13, 2024
6 checks passed
@janfb janfb deleted the fix-tarp-without-batched-sampling branch December 13, 2024 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Diagnostics fail for samplers that do not support sample_batched
2 participants