diff --git a/src/transformers/training_args.py b/src/transformers/training_args.py index c1d69a05f85f73..b5b16786093fa0 100644 --- a/src/transformers/training_args.py +++ b/src/transformers/training_args.py @@ -1582,7 +1582,7 @@ def __post_init__(self): ) and self.metric_for_best_model is None: self.metric_for_best_model = "loss" if self.greater_is_better is None and self.metric_for_best_model is not None: - self.greater_is_better = not(self.metric_for_best_model.endswith("loss")) + self.greater_is_better = not (self.metric_for_best_model.endswith("loss")) if self.run_name is None: self.run_name = self.output_dir if self.framework == "pt" and is_torch_available():