If we do something like:
model = define_model(...)
fit1 = model.run_algo('nuts', ...)
fit2 = model.run_algo('nuts', ...)
... then each call to run_algo will invoke NumPyro's model compilation. It ought to be possible to avoid this (in cases where the data shape doesn't change between calls) by caching the MCMC instance and reusing it on subsequent calls.
If we do something like:
... then each call to
run_algowill invoke NumPyro's model compilation. It ought to be possible to avoid this (in cases where the data shape doesn't change between calls) by caching theMCMCinstance and reusing it on subsequent calls.