numpyro icon indicating copy to clipboard operation
numpyro copied to clipboard

Stress test utility for numpyro?

Open SamuelBrand1 opened this issue 1 year ago • 2 comments

Hi everyone,

I'm working on an ODE based model (solver from diffrax) for respiratory viruses fitted on past seasons of data.

At the moment, we occasionally have maximum iteration fails during NUTS warm-up. This is a bit of a classic problem with ODE models, but I was wondering if there was a stress test utility in numpyro which will sample parameters (in the unconstrained domain I guess) and record the parameters that cause a fail in the model log posterior density call (e.g. like this from LogDensityProblems.jl.

I had a look in the docs but I might well have missed something, apols in advance if I have.

SamuelBrand1 avatar Jul 16 '24 21:07 SamuelBrand1

I think you can draw samples from prior and use the utility log_density to check which of them causes NaN. We don't have a utility for that but please feel free to submit a PR. The feature would be useful for many usage cases.

fehiepsi avatar Jul 19 '24 20:07 fehiepsi

Cheers for the update.

SamuelBrand1 avatar Jul 22 '24 09:07 SamuelBrand1