From 21d01f7b0cbde4f26b35568b145c25688fc7aef9 Mon Sep 17 00:00:00 2001 From: Frederico Tommasi Caroli Date: Tue, 24 Jan 2023 11:00:40 -0800 Subject: [PATCH 1/3] Update TrainingArguments.label_names docs --- src/transformers/training_args.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/transformers/training_args.py b/src/transformers/training_args.py index 1a907107f865..d35956041d96 100644 --- a/src/transformers/training_args.py +++ b/src/transformers/training_args.py @@ -352,8 +352,9 @@ class TrainingArguments: label_names (`List[str]`, *optional*): The list of keys in your dictionary of inputs that correspond to the labels. - Will eventually default to `["labels"]` except if the model used is one of the `XxxForQuestionAnswering` in - which case it will default to `["start_positions", "end_positions"]`. + Will eventually default to the list of input keys that contain the word "label", except if the model used is + one of the `XxxForQuestionAnswering` in which case it will also include the + `["start_positions", "end_positions"]` keys. load_best_model_at_end (`bool`, *optional*, defaults to `False`): Whether or not to load the best model found during training at the end of training. From caa04b43d155f98e757710153dd8add4e5ccfdad Mon Sep 17 00:00:00 2001 From: Frederico Tommasi Caroli Date: Tue, 24 Jan 2023 11:22:57 -0800 Subject: [PATCH 2/3] Change wording --- src/transformers/training_args.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transformers/training_args.py b/src/transformers/training_args.py index d35956041d96..21dcd36b4c0e 100644 --- a/src/transformers/training_args.py +++ b/src/transformers/training_args.py @@ -352,8 +352,8 @@ class TrainingArguments: label_names (`List[str]`, *optional*): The list of keys in your dictionary of inputs that correspond to the labels. - Will eventually default to the list of input keys that contain the word "label", except if the model used is - one of the `XxxForQuestionAnswering` in which case it will also include the + Will eventually default to the list of arguments names in `model.forward` that contain the word "label", + except if the model used is one of the `XxxForQuestionAnswering` in which case it will also include the `["start_positions", "end_positions"]` keys. load_best_model_at_end (`bool`, *optional*, defaults to `False`): Whether or not to load the best model found during training at the end of training. From 96ee07fac9d50a98792d9eec99e4ab9f1311267b Mon Sep 17 00:00:00 2001 From: Frederico Tommasi Caroli Date: Tue, 24 Jan 2023 11:24:40 -0800 Subject: [PATCH 3/3] Change wording --- src/transformers/training_args.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformers/training_args.py b/src/transformers/training_args.py index 21dcd36b4c0e..2a709fb8d895 100644 --- a/src/transformers/training_args.py +++ b/src/transformers/training_args.py @@ -352,7 +352,7 @@ class TrainingArguments: label_names (`List[str]`, *optional*): The list of keys in your dictionary of inputs that correspond to the labels. - Will eventually default to the list of arguments names in `model.forward` that contain the word "label", + Will eventually default to the list of argument names accepted by the model that contain the word "label", except if the model used is one of the `XxxForQuestionAnswering` in which case it will also include the `["start_positions", "end_positions"]` keys. load_best_model_at_end (`bool`, *optional*, defaults to `False`):