You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DOCS: Clarification on the use of label_names as an argument to TrainingArguments (#40353)
* Update trainer.md
* Update trainer.md
Removed the detail about label_names argument usage from the tip/ warning section
* Update training_args.py
Added the label_names usage clarification in the docstring
* Update trainer.md
---------
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Copy file name to clipboardExpand all lines: src/transformers/training_args.py
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -453,6 +453,8 @@ class TrainingArguments:
453
453
Will eventually default to the list of argument names accepted by the model that contain the word "label",
454
454
except if the model used is one of the `XxxForQuestionAnswering` in which case it will also include the
455
455
`["start_positions", "end_positions"]` keys.
456
+
457
+
You should only specify `label_names` if you're using custom label names or if your model's `forward` consumes multiple label tensors (e.g., extractive QA).
456
458
load_best_model_at_end (`bool`, *optional*, defaults to `False`):
457
459
Whether or not to load the best model found during training at the end of training. When this option is
458
460
enabled, the best checkpoint will always be saved. See
0 commit comments