diff --git a/src/transformers/integrations/integration_utils.py b/src/transformers/integrations/integration_utils.py index be9a4aff3c7e7f..b24c4c9e0d5cad 100755 --- a/src/transformers/integrations/integration_utils.py +++ b/src/transformers/integrations/integration_utils.py @@ -2125,7 +2125,12 @@ def on_train_end(self, args, state, control, **kwargs): from transformers.trainer import Trainer if self._log_model is True: - fake_trainer = Trainer(args=args, model=kwargs.get("model"), processing_class=kwargs.get("tokenizer")) + fake_trainer = Trainer( + args=args, + model=kwargs.get("model"), + processing_class=kwargs.get("tokenizer"), + eval_dataset=["fake"], + ) name = "best" if args.load_best_model_at_end else "last" output_dir = os.path.join(args.output_dir, name) fake_trainer.save_model(output_dir)