Skip to content

1446 add api for guidance#1482

Open
manuelgloeckler wants to merge 45 commits intomainfrom
1446-add-api-for-guidance
Open

1446 add api for guidance#1482
manuelgloeckler wants to merge 45 commits intomainfrom
1446-add-api-for-guidance

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
@codecov
Copy link

codecov bot commented Mar 20, 2025

Codecov Report

❌ Patch coverage is 67.21311% with 160 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.83%. Comparing base (937efc2) to head (672514b).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
sbi/utils/vector_field_utils.py 65.78% 103 Missing ⚠️
sbi/inference/potentials/vector_field_adaptor.py 68.18% 56 Missing ⚠️
sbi/inference/potentials/vector_field_potential.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1482      +/-   ##
==========================================
- Coverage   88.54%   83.83%   -4.72%     
==========================================
  Files         137      136       -1     
  Lines       11515    11797     +282     
==========================================
- Hits        10196     9890     -306     
- Misses       1319     1907     +588     
Flag Coverage Δ
fast 83.83% <67.21%> (?)
full ?

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 69.12% <ø> (-8.06%) ⬇️
...i/neural_nets/estimators/flowmatching_estimator.py 81.66% <ø> (-15.00%) ⬇️
sbi/inference/potentials/vector_field_potential.py 75.20% <90.90%> (-15.87%) ⬇️
sbi/inference/potentials/vector_field_adaptor.py 78.19% <68.18%> (ø)
sbi/utils/vector_field_utils.py 66.12% <65.78%> (-17.21%) ⬇️

... and 25 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
@manuelgloeckler manuelgloeckler requested a review from janfb February 2, 2026 16:49
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