pytorch_pfn_extras.handler.Handler¶
- class pytorch_pfn_extras.handler.Handler(logic, entry_runtime, options)¶
- Parameters
entry_runtime (BaseRuntime) –
options (Dict[str, Any]) –
- Return type
None
- __init__(logic, entry_runtime, options)¶
A set of callback functions to perform device-specific operations.
- Parameters
logic (Logic) – A logic.
entry_runtime (BaseRuntime) – A runtime object.
options (dict) –
The configuration options.
'eval_report_keys'
(list of str):A list of names of outputs that are given as inputs of
reporting.report
after each evaluation step. Default is an empty list.
'train_report_keys'
(list of str):A list of names of outputs that are given as inputs of
reporting.report
after each training step. Default is an empty list.
- Return type
None
Methods
__init__
(logic, entry_runtime, options)A set of callback functions to perform device-specific operations.
consume_options
(options)A method to update options of Handler.
eval_loop_begin
(evaluator)A method called before each evaluation step.
eval_loop_end
(evaluator)A method called after running all steps of the evaluation.
eval_post_step
(evaluator, batch_idx, batch, …)A method called after each evaluation step.
eval_setup
(evaluator, loader)Called only once when starting a training run.
eval_step
(evaluator, batch_idx, batch, …)Evaluation iteration.
train_epoch_begin
(trainer, loader)A method called when starting a new epoch.
train_epoch_end
(trainer)A method called when finishing an epoch.
train_post_step
(trainer, batch_idx, batch, …)A method called after each training step.
train_setup
(trainer, loader)A method called only once when starting a training run.
train_step
(trainer, batch_idx, batch, …)A training step.
train_validation_begin
(trainer, evaluator)A method called when starting a validation.
train_validation_end
(trainer, evaluator)A method called after validation.