pytorch_pfn_extras.training.extensions.PrintReport¶
- class pytorch_pfn_extras.training.extensions.PrintReport(entries=None, log_report='LogReport', out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)¶
An extension to print the accumulated results.
This extension uses the log accumulated by a
LogReport
extension to print specified entries of the log in a human-readable format.- Parameters
entries (list of str or None) – List of keys of observations to print. If None is passed, automatically infer keys from reported dict.
log_report (str or LogReport) – Log report to accumulate the observations. This is either the name of a LogReport extensions registered to the manager, or a LogReport instance to use internally.
out (IO[Any]) – Stream to print the bar. Standard output is used by default.
- Return type
None
- __init__(entries=None, log_report='LogReport', out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)¶
- Parameters
entries (Optional[Sequence[str]]) –
log_report (Union[str, pytorch_pfn_extras.training.extensions.log_report.LogReport]) –
out (IO[Any]) –
- Return type
None
Methods
__init__
([entries, log_report, out])finalize
()Finalizes the extension.
get_log_report
(manager)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.
is_async
name
needs_model_state
priority
trigger