Skip to content

Conversation

manuelgloeckler
Copy link
Contributor

@manuelgloeckler manuelgloeckler commented Mar 18, 2025

This adds an API for post-hoc modifications of the trained score estimator, allowing modifications of the likelihood or prior, the support, or other additional constraints. This addresses issue #1446 .

To does:

  • Adds general API inline with current iid_method
  • Refactor the parameterizations from stringly type to strongly typed (also for iid!)
  • Adds some useful explanatory guidance approaches:
    • Classifier free guidance
    • Universal guidance - interval truncations.

@manuelgloeckler manuelgloeckler linked an issue Mar 18, 2025 that may be closed by this pull request
5 tasks
@manuelgloeckler manuelgloeckler marked this pull request as draft March 18, 2025 18:48
@manuelgloeckler manuelgloeckler self-assigned this Mar 18, 2025
@manuelgloeckler manuelgloeckler marked this pull request as ready for review March 20, 2025 07:05
Copy link

codecov bot commented Mar 20, 2025

Codecov Report

❌ Patch coverage is 91.72932% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.79%. Comparing base (28f3deb) to head (0476ab0).

Files with missing lines Patch % Lines
sbi/inference/potentials/score_fn_util.py 91.89% 9 Missing ⚠️
sbi/inference/potentials/vector_field_potential.py 90.90% 1 Missing ⚠️
sbi/utils/score_utils.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1482      +/-   ##
==========================================
- Coverage   87.89%   83.79%   -4.10%     
==========================================
  Files         134      134              
  Lines       11168    11286     +118     
==========================================
- Hits         9816     9457     -359     
- Misses       1352     1829     +477     
Flag Coverage Δ
unittests 83.79% <91.72%> (-4.10%) ⬇️

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

Files with missing lines Coverage Δ
sbi/inference/posteriors/vector_field_posterior.py 71.53% <ø> (-8.03%) ⬇️
sbi/inference/potentials/vector_field_potential.py 75.20% <90.90%> (-15.87%) ⬇️
sbi/utils/score_utils.py 91.50% <90.90%> (-0.17%) ⬇️
sbi/inference/potentials/score_fn_util.py 88.81% <91.89%> (ø)

... and 29 files with indirect coverage changes

@manuelgloeckler manuelgloeckler added the blocked Something is in the way of fixing this. Refer to it in the issue label Mar 24, 2025
@manuelgloeckler manuelgloeckler removed the blocked Something is in the way of fixing this. Refer to it in the issue label Sep 5, 2025
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.

Add API for guidance

3 participants