sbi v0.22 BoxUniform and torch.distributions require that all arguments be Tensors. This breaks our initialization of priors in the sbi backend, which was previously done with floats and tuples.
Now, we catch the prior arguments and convert them to Tensors on the right device before passing them to SBIRunner.
This will only break if the prior distribution accepts something other than a number (e.g. string). However, this isn't the case for any torch.distributions.
sbi
v0.22 BoxUniform andtorch.distributions
require that all arguments be Tensors. This breaks our initialization of priors in thesbi
backend, which was previously done with floats and tuples.Now, we catch the
prior
arguments and convert them to Tensors on the right device before passing them toSBIRunner
.This will only break if the prior distribution accepts something other than a number (e.g. string). However, this isn't the case for any
torch.distributions
.