Restart an existing MCMC chain at the same point it was paused

In my workflow, I want to be able look at the metrics of a MCMC chain, so I want run it for a certain amount of iteration. I want to then be able to continue the same chain for more iterations.

How could this be done with Turing.jl

1 Like

DynamicHMC.jl has a stepwise implementation, though it is not exposed in the API officially. See mcmc_next_step, and the docstring of DynamicHMC.mcmc_steps.

Thank you for the reply.

I have gotten it to work with this approach


small_chain = sample(model,.NUTS(0.65), short_iter; save_state=true, progress = false);
        
last_state = short_chain.info.samplerstate;

long_chain = sample(model, NUTS(N), long_iter; resume_from=last_state , progress = false)
4 Likes