meridian.model.progress.TqdmProgressBar

A progress callback that displays sampling progress as tqdm progress bars.

Pass an instance as the progress_callback of Meridian.sample_prior, Meridian.sample_posterior or Meridian.sample_posterior_and_review. It displays a progress bar for each of the following:

  • Prior sampling, which advances as each prior sampling stage completes.
  • Each posterior chain batch, which advances after every draw on the JAX backend and once per chain batch on the TensorFlow backend. On the JAX backend, the first chain batch stays at zero draws while the sampler compiles.
  • The posterior reconstruction, which advances after each reconstruction batch.

Each bar shows the current stage, and the posterior bars show the number of divergent transitions among the kept draws so far. The bars are rendered with tqdm.auto: as widgets in notebooks and as text in a terminal.

One instance can be passed to several sampling calls, one call at a time.

Methods

__call__

View source

Updates the progress bars with a progress snapshot.