From a74d68c7e6b9d1c2acbba5f63c2baf0d96f72e8e Mon Sep 17 00:00:00 2001 From: "Sean (Seok-Won) Yi" Date: Fri, 25 Oct 2024 23:51:34 +0900 Subject: [PATCH] `new_best_metric` -> `is_new_best_metric` Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com> --- src/transformers/trainer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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