sbi icon indicating copy to clipboard operation
sbi copied to clipboard

A "flexible interface" for diagnostic tools

Open michaeldeistler opened this issue 1 year ago • 1 comments

In a couple of issues now, users have reported memory issues with SBC. I think the easiest way to overcome these issues is to introduce a whole new interface for SBC which might contain a couple of lines of code but which gives much more flexibility.

The other option is to just adding more and more kwargs to run_sbc, but I would really be in favor of just developing a new interface.

michaeldeistler avatar Dec 11 '24 16:12 michaeldeistler

In the refactoring #1196 we already separated the sampling from the run_{sbc, tarp}. So in principle, it's possible to do things more low-level, e.g., first generate posterior samples on a test set, and pass them to sbc and tarp without having to pass a posterior for sampling anymore. But this is not documented well.

But overall, I agree: we should think about a more elegant interface for the diagnostics in general. First, something more high-level like sbi.train() -> sbi.build_posterior() -> sbi.diagnose() and something more low-level like you are suggesting.

janfb avatar Dec 11 '24 16:12 janfb