Shortcuts

torchtnt.utils.progress.Progress

class torchtnt.utils.progress.Progress(num_epochs_completed: int = 0, num_steps_completed: int = 0, num_steps_completed_in_epoch: int = 0)

Class to track progress during the loop. Includes state_dict/load_state_dict for convenience for checkpointing.

__init__(num_epochs_completed: int = 0, num_steps_completed: int = 0, num_steps_completed_in_epoch: int = 0) None

Methods

__init__([num_epochs_completed, ...])
increment_epoch() Increment the epochs completed and resets the steps completed within the epoch.
increment_step() Increment the step counts completed and completed within the epoch.
load_state_dict(state_dict) Restores a Progress instance from a state_dict in accordance with Stateful protocol.
state_dict() Returns a state_dict of a Progress instance in accordance with Stateful protocol.

Attributes

num_epochs_completed Number of epochs completed thus far in loop.
num_steps_completed Number of steps completed thus far in loop.
num_steps_completed_in_epoch Number of steps completed thus far in epoch.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources