langtest.callback.LangTestCallback#
- class LangTestCallback(task, config=None, data=None, print_reports=True, save_reports=False, run_each_epoch=False)#
Bases:
TrainerCallback
- __init__(task, config=None, data=None, print_reports=True, save_reports=False, run_each_epoch=False) None #
Methods
__init__
(task[, config, data, ...])on_epoch_begin
(args, state, control, **kwargs)Event called at the beginning of an epoch.
on_epoch_end
(args, state, control, **kwargs)Event called at the end of an epoch.
on_evaluate
(args, state, control, **kwargs)Event called after an evaluation phase.
on_init_end
(args, state, control, **kwargs)Event called at the end of the initialization of the [Trainer].
on_log
(args, state, control, **kwargs)Event called after logging the last logs.
on_predict
(args, state, control, metrics, ...)Event called after a successful prediction.
on_prediction_step
(args, state, control, ...)Event called after a prediction step.
on_save
(args, state, control, **kwargs)Event called after a checkpoint save.
on_step_begin
(args, state, control, **kwargs)Event called at the beginning of a training step.
on_step_end
(args, state, control, **kwargs)Event called at the end of a training step.
on_substep_end
(args, state, control, **kwargs)Event called at the end of an substep during gradient accumulation.
on_train_begin
(args, state, control, **kwargs)Event called at the beginning of training.
on_train_end
(args, state, control, **kwargs)Event called at the end of training.
- on_epoch_begin(args: TrainingArguments, state: TrainerState, control: TrainerControl, **kwargs)#
Event called at the beginning of an epoch.
- on_epoch_end(args, state, control, **kwargs)#
Event called at the end of an epoch.
- on_evaluate(args: TrainingArguments, state: TrainerState, control: TrainerControl, **kwargs)#
Event called after an evaluation phase.
- on_init_end(args, state, control, **kwargs)#
Event called at the end of the initialization of the [Trainer].
- on_log(args: TrainingArguments, state: TrainerState, control: TrainerControl, **kwargs)#
Event called after logging the last logs.
- on_predict(args: TrainingArguments, state: TrainerState, control: TrainerControl, metrics, **kwargs)#
Event called after a successful prediction.
- on_prediction_step(args: TrainingArguments, state: TrainerState, control: TrainerControl, **kwargs)#
Event called after a prediction step.
- on_save(args: TrainingArguments, state: TrainerState, control: TrainerControl, **kwargs)#
Event called after a checkpoint save.
- on_step_begin(args: TrainingArguments, state: TrainerState, control: TrainerControl, **kwargs)#
Event called at the beginning of a training step. If using gradient accumulation, one training step might take several inputs.
- on_step_end(args: TrainingArguments, state: TrainerState, control: TrainerControl, **kwargs)#
Event called at the end of a training step. If using gradient accumulation, one training step might take several inputs.
- on_substep_end(args: TrainingArguments, state: TrainerState, control: TrainerControl, **kwargs)#
Event called at the end of an substep during gradient accumulation.
- on_train_begin(args, state, control, **kwargs)#
Event called at the beginning of training.
- on_train_end(args, state, control, **kwargs)#
Event called at the end of training.