Skip to content

Commit

Permalink
Rename sanity_evaluation to eval_on_start (#31192)
Browse files Browse the repository at this point in the history
* Rename sanity_evaluation to eval_on_start

* move arg back to last
  • Loading branch information
Qubitium authored Jun 3, 2024
1 parent c230504 commit c6c7873
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/transformers/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2175,7 +2175,7 @@ def _inner_training_loop(
grad_norm: Optional[float] = None
self.control = self.callback_handler.on_train_begin(args, self.state, self.control)

if args.sanity_evaluation:
if args.eval_on_start:
self._evaluate(trial, ignore_keys_for_eval, skip_scheduler=True)

total_batched_samples = 0
Expand Down
6 changes: 3 additions & 3 deletions src/transformers/training_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,8 +772,8 @@ class TrainingArguments:
that takes a boolean argument `compute_result`, which when passed `True`, will trigger the final global
summary statistics from the batch-level summary statistics you've accumulated over the evaluation set.
sanity_evaluation(`bool`, *optional*, defaults to `False`):
Whether or not to perform a sanity check to ensure that the validation steps works correctly. It will be performed before the training.
eval_on_start(`bool`, *optional*, defaults to `False`):
Whether to perform a evaluation step (sanity check) before the training to ensure the validation steps works correctly.
"""

framework = "pt"
Expand Down Expand Up @@ -1457,7 +1457,7 @@ class TrainingArguments:
metadata={"help": "Break eval metrics calculation into batches to save memory."},
)

sanity_evaluation: bool = field(
eval_on_start: bool = field(
default=False,
metadata={
"help": "Whether to run through the entire `evaluation` step at the very beginning of training as a sanity check."
Expand Down

0 comments on commit c6c7873

Please sign in to comment.