hydrax.tqdm.ProgressMonitor#

class hydrax.tqdm.ProgressMonitor(dataloader: Dataloader[D], report_interval: int = 0, description: str = 'train', **kwargs)#

Bases: Generic[D]

Provides tqdm progress bars for a Dataloader.

Tip

In most cases, you can use tbatches() instead, which wraps a dataloader and yields its batches.

Parameters:
  • dataloader – The Dataloader. It must be deterministic.

  • report_interval – Interval, in batches, to check for issues and report. 0 by default, which means reporting is disabled.

  • description – A description for the progress bar. Defaults to “train”.

  • kwargs – Additional keyword arguments passed to tqdm.

__enter__() ProgressMonitor[D]#

Use via a with block. Calls close() on exit.

begin_batch(batch: Batch[D]) None#

Signal the start of a batch.

close() None#

Signal the end of monitoring.

end_batch(batch: Batch[D]) None#

Signal the end of a batch.