pytorch_pfn_extras.training.extensions.ProgressBar¶
- class pytorch_pfn_extras.training.extensions.ProgressBar(training_length=None, update_interval=100, bar_length=50, out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)¶
An extension to print a progress bar and recent training status.
This extension prints a progress bar at every call. It watches the current iteration and epoch to print the bar.
- Parameters
training_length (tuple or None) – Length of whole training. It consists of an integer and either
'epoch'
or'iteration'
. If this value is omitted and the stop trigger of the manager isIntervalTrigger
, this extension uses its attributes to determine the length of the training.update_interval (int) – Number of iterations to skip printing the progress bar.
bar_length (int) – Length of the progress bar in characters.
out – Stream to print the bar. Standard output is used by default.
- __init__(training_length=None, update_interval=100, bar_length=50, out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)¶
Methods
__init__
([training_length, update_interval, …])finalize
()Finalizes the extension.
initialize
(manager)Initializes up the manager state.
load_state_dict
(to_load)on_error
(manager, exc, tb)Handles the error raised during training before finalization.
state_dict
()Serializes the extension state.
Attributes
default_name
Default name of the extension.
name
priority
trigger