Skip to content

euroeval.callbacks

source module euroeval.callbacks

Callbacks for the Hugging Face Trainer.

Classes

source class NeverLeaveProgressCallback(max_str_len: int = 100)

Bases : ProgressCallback

Progress callback which never leaves the progress bar.

Initialise the callback.

Methods

source method NeverLeaveProgressCallback.on_train_begin(args: TrainingArguments, state: TrainerState, control: TrainerControl, **kwargs: str)None

Callback actions when training begins.

source method NeverLeaveProgressCallback.on_step_end(args: TrainingArguments, state: TrainerState, control: TrainerControl, **kwargs: str)None

Callback actions when a training step ends.

source method NeverLeaveProgressCallback.on_prediction_step(args: TrainingArguments, state: TrainerState, control: TrainerControl, eval_dataloader: DataLoader | None = None, **kwargs: str)None

Callback actions when a prediction step ends.