bartz.mcmcloop.TqdmCallback

class bartz.mcmcloop.TqdmCallback(bar_id, update_every, report_every, accumulator)[source]

tqdm progress-bar callback for run_mcmc, see make_tqdm_callback.

bar_id: Int32[Array, '']

Handle identifying the bar in the module-level tqdm bar registry.

update_every: Int32[Array, '']

The bar position is refreshed every update_every MCMC iterations.

report_every: Int32[Array, ''] | None

The acceptance statistics are refreshed every report_every MCMC iterations, None to omit them.

accumulator: StatsAccumulator

Running average of the reported statistics, inert unless averaging.

__call__(*, state, i_total, n_burn, n_save, n_skip, **_)[source]

Advance a tqdm progress bar during the MCMC.

Return type:

tuple[State, TqdmCallback]