-
Notifications
You must be signed in to change notification settings - Fork 188
refactor sbc funcs and tests #1578
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1578 +/- ##
==========================================
- Coverage 86.02% 78.89% -7.13%
==========================================
Files 135 135
Lines 10754 10770 +16
==========================================
- Hits 9251 8497 -754
- Misses 1503 2273 +770
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
str, | ||
Callable[[Tensor, Tensor], Tensor], | ||
List[Callable[[Tensor, Tensor], Tensor]], | ||
] = "marginals", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we always call it with reduce_fn(theta, x)
def _run_sbc( | ||
thetas: Tensor, | ||
xs: Tensor, | ||
posterior_samples: Tensor, | ||
posterior: NeuralPosterior, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we used this argument only to check whether it's a VIPosterior
. we now do this above in run_sbc
so that this internal function can be called with just samples.
VIPosterior
handling to the public API with a wrapper approach.