drytorch.trackers.tqdm
Module containing a tqdm tracker for progress bars.
Classes
|
Bar that displays the current epoch's metrics and progress. |
|
Create an epoch progress bar. |
|
Create a bar for the training progress. |
- class EpochBar(batch_size: int | None, n_iter: int, n_samples: int, leave: bool, file: SupportsWrite[str], desc: str, position: int = 0)[source]
Bases:
objectBar that displays the current epoch’s metrics and progress.
This class is also used to display metrics and progress during evaluation.
- pbar
the wrapped tqdm bar.
- Type:
tqdm.asyncio.tqdm_asyncio
Initialize.
- Parameters:
batch_size (int | None) – how many samples are in one batch.
n_iter (int) – the number of expected iterations.
n_samples (int) – the total number of samples.
leave (bool) – whether to leave the bar in after the epoch.
file (SupportsWrite[str]) – the stream where to flush the bar.
desc (str) – description to contextualize the bar.
position (int) – position of the bar in the progress bar group.
- class TqdmLogger(leave: bool = True, enable_training_bar: bool = False, file: SupportsWrite[str] = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>)[source]
Bases:
TrackerCreate an epoch progress bar.
Initialize.
- Parameters:
Note
Enable the training bar only if two progress bars are supported, and there is no other logger or printer streaming.
- notify(event: Event) None[source]
- notify(event: IterateBatchEvent) None
- notify(event: StartTrainingEvent) None
- notify(event: StartEpochEvent) None
- notify(event: EndEpochEvent) None
- notify(event: EndTestEvent) None
- notify(event: TerminatedTrainingEvent) None
- notify(event: EndTrainingEvent) None
Notify the tracker of an event.
- Parameters:
event (Event) – the event to notify about.
- Return type:
None
- class TrainingBar(start_epoch: int, end_epoch: int, file: SupportsWrite[str], leave: bool)[source]
Bases:
objectCreate a bar for the training progress.
- Class Attributes:
fmt: the formatting of the bar. desc: the name for the iteration. color: the color of the bar.
- pbar
the wrapped tqdm bar.
- Type:
tqdm.asyncio.tqdm_asyncio
Initialize.
- Parameters: