maho3 / ltu-ili

Robust ML in Astro
https://ltu-ili.readthedocs.io/en/latest/
45 stars 9 forks source link

Examples break in sbi v0.22 #107

Closed maho3 closed 11 months ago

maho3 commented 11 months ago

The new pip version of sbi (v0.22) includes an annoying change which breaks some of our examples.

Now, sbi.utils.BoxUniform checks that the low and high arguments are torch Tensors, instead of previously being amenable to tuples. Everywhere in our examples and tests that uses this class now breaks...

Currently, I have a hack in #106 that just forces us to install sbi<=0.21. However, a more permanent solution would be either to wrap BoxUniform or to catch this and convert any tuple inputs to torch tensors.

maho3 commented 11 months ago

sbi did this to mimic the behavior in torch.distributions, so we now need to catch this generally.