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

refactor: update batch size and mcmc defaults. #1221

Merged
merged 4 commits into from
Aug 20, 2024
Merged

refactor: update batch size and mcmc defaults. #1221

merged 4 commits into from
Aug 20, 2024

Conversation

janfb
Copy link
Contributor

@janfb janfb commented Aug 17, 2024

Update default arguments

Training batch size is set to training_batch_size=200.

MCMC default method is set to `method = "slice_np_vectorized", i.e., vectorized slice sampling. This makes it possible to run multiple chains in parallel fast and on a single CPU.

MCMC chains is set to num_chains=20 (was =1), because this is fast when vectorized.

fixes #910

Copy link

codecov bot commented Aug 17, 2024

Codecov Report

Attention: Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.

Project coverage is 76.87%. Comparing base (b3254ed) to head (867c10a).
Report is 4 commits behind head on main.

Files Patch % Lines
sbi/utils/diagnostics_utils.py 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1221      +/-   ##
==========================================
- Coverage   85.44%   76.87%   -8.57%     
==========================================
  Files         101      101              
  Lines        7941     7945       +4     
==========================================
- Hits         6785     6108     -677     
- Misses       1156     1837     +681     
Flag Coverage Δ
unittests 76.87% <90.90%> (-8.57%) ⬇️

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

Files Coverage Δ
sbi/analysis/sensitivity_analysis.py 19.13% <ø> (ø)
sbi/diagnostics/sbc.py 95.71% <100.00%> (-0.07%) ⬇️
sbi/diagnostics/tarp.py 82.92% <ø> (-14.64%) ⬇️
sbi/inference/base.py 89.30% <ø> (ø)
sbi/inference/fmpe/fmpe_base.py 94.33% <ø> (ø)
sbi/inference/posteriors/mcmc_posterior.py 85.93% <ø> (-0.77%) ⬇️
sbi/inference/snle/mnle.py 85.36% <ø> (-7.32%) ⬇️
sbi/inference/snle/snle_base.py 93.87% <ø> (ø)
sbi/inference/snpe/snpe_a.py 63.91% <ø> (-27.40%) ⬇️
sbi/inference/snpe/snpe_base.py 91.61% <ø> (ø)
... and 8 more

... and 18 files with indirect coverage changes

@janfb janfb force-pushed the set-default-args branch from 0bcd820 to 867c10a Compare August 20, 2024 12:18
@janfb janfb self-assigned this Aug 20, 2024
@janfb janfb added this to the Hackathon and release 0.23 milestone Aug 20, 2024
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!

sbi/diagnostics/sbc.py Show resolved Hide resolved
@janfb janfb merged commit 72b3a7d into main Aug 20, 2024
6 checks passed
@janfb janfb deleted the set-default-args branch August 20, 2024 12:59
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.

Better default arguments for MCMC, SNLE, SNPE.
2 participants