descope.trainer
- class DeSCOPETrainer(args: TrainingArguments, model: PreTrainedModel | Module, train_dataset: Dataset | Dataset, eval_dataset: Dataset | Dataset | None = None, data_collator: Callable[[list[Any]], dict[str, Any]] | None = None)[source]
Bases:
Trainer- NOTE:
Early stopping does not currently support resuming training. If training is forcibly resumed, the early stopping callback will be reinitialized.
If you enable early stopping, ensure that eval_every_n_epochs and checkpointing_steps are aligned, as the Trainer does not automatically save the best model.
The final model is always saved at the end of training, even if early stopping is triggered.