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
@@ -456,6 +456,8 @@ class TrainingArguments:
456
456
Will eventually default to the list of argument names accepted by the model that contain the word "label",
457
457
except if the model used is one of the `XxxForQuestionAnswering` in which case it will also include the
458
458
`["start_positions", "end_positions"]` keys.
459
+
460
+
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).
459
461
load_best_model_at_end (`bool`, *optional*, defaults to `False`):
460
462
Whether or not to load the best model found during training at the end of training. When this option is
461
463
enabled, the best checkpoint will always be saved. See
0 commit comments