Get number of steps, sizes and acc. prob over all iterations

Is it possible to get all number of steps, step sizes and acc. prob for all iterations, i.e. what is currently displayed in the status bar:

warmup:  25%|██▌       | 378/1500 [14:00<45:00,  2.41s/it, 127 steps of size 6.28e-03. acc. prob=0.78]

I’m interested to see the behavior of these parameters over the iterations, since I noticed they can vary widely.

yes, you can use extra_fields in the run method to collect extra information, then use get_extra_fields method to obtain those extra information.

1 Like

Thanks, now that I know where to look I found the extra_fields parameter in, and the MCMC.get_extra_fields method.

More importantly, what I missed earlier is that the possible extra fields are defined in HMCState.

Thanks for your help!

Yeah, I’m glad that it works. You can also extract subfields, e.g., adapt_state.step_size.