Save Intermediate Warmup Sample

Is it possible to save intermediate warmup samples when using collect_samples=True, similar to how you can save intermediate samples during the normal NUTS sampling using post_warmup_state?

Like the question here I am taking 10,000 samples but saving every 1,000. When I try running warmup for 4,000 warmup samples with collect_warmup=True I have a resource exhausted error (which does not occur when I don’t collect warmup samples).

Thank you

How about using thinning for that? I think you can set thinning=1000, run warmup method, then set thinning=1 and run run method.

1 Like

This is a good workaround, thank you!