diff --git a/src/transformers/trainer.py b/src/transformers/trainer.py index 4b31b992022e3e..229bde0d6e28b8 100755 --- a/src/transformers/trainer.py +++ b/src/transformers/trainer.py @@ -3001,7 +3001,7 @@ def _maybe_log_save_evaluate(self, tr_loss, grad_norm, model, trial, epoch, igno metrics = None if self.control.should_evaluate: metrics = self._evaluate(trial, ignore_keys_for_eval) - new_best_metric = self._determine_best_metric(metrics=metrics, trial=trial) + is_new_best_metric = self._determine_best_metric(metrics=metrics, trial=trial) if self.args.save_strategy == SaveStrategy.BEST: self.control.should_save = new_best_metric