In recent versions of PyTorch, default behavior for distributions changed to validate args by default. As consequence of this, evaluating an distribution out of its support throws an error rather than returning torch(-inf). This PR restores the old behavior by disabling validation for the prior distributions. In the future, we might change the rejection sampling algorithms instead, by using within_support from sbi.
In recent versions of PyTorch, default behavior for distributions changed to validate args by default. As consequence of this, evaluating an distribution out of its support throws an error rather than returning
torch(-inf)
. This PR restores the old behavior by disabling validation for the prior distributions. In the future, we might change the rejection sampling algorithms instead, by usingwithin_support
fromsbi
.