Getting run time for different phases of warmup

In cmdstanr, I can use

fit$time()

to get the warmup and sampling time. Can I refine this to get times for the runtime for various phases of warmup?

Not at this time no, because those warmup/sampling are the only two numbers that CmdStan reports.

I think what @Bob_Carpenter was aiming at the meeting was changing the the number of iterations in the warmup phases with the init_buffer, term_buffer and window arguments and seeing how that affects play (see docs on that here Run Stan's MCMC algorithms — model-method-sample • cmdstanr). Might have misunderstood though.

It should not be too difficult to make a branch of Stan that would report those though. As long as you get them written in the CSV you can obtain in cmdstanr as well.

1 Like

I need to run and interrupt the sampler over various phases anyways, so it shouldn’t be too difficult to get the run times on top of that. I don’t know that this warrants a new feature in cmdstan, it’s useful only for a pretty specific project.

1 Like