From 42bfb83d748ff589528467617b4f9f9945e14d97 Mon Sep 17 00:00:00 2001 From: Matthew Goldey Date: Tue, 26 Oct 2021 16:36:26 -0400 Subject: [PATCH] fix typos in error messages in speech recognition example and modelcard.py (#14166) * specify the text column name in the error message * pluralize the word fields --- .../pytorch/speech-recognition/run_speech_recognition_ctc.py | 2 +- src/transformers/modelcard.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/pytorch/speech-recognition/run_speech_recognition_ctc.py b/examples/pytorch/speech-recognition/run_speech_recognition_ctc.py index a03d93c443..cc1362c48f 100755 --- a/examples/pytorch/speech-recognition/run_speech_recognition_ctc.py +++ b/examples/pytorch/speech-recognition/run_speech_recognition_ctc.py @@ -356,7 +356,7 @@ def main(): if data_args.text_column_name not in raw_datasets["train"].column_names: raise ValueError( - f"--text_column_name {data_args.audio_column_name} not found in dataset '{data_args.dataset_name}'. " + f"--text_column_name {data_args.text_column_name} not found in dataset '{data_args.dataset_name}'. " "Make sure to set `--text_column_name` to the correct text column - one of " f"{', '.join(raw_datasets['train'].column_names)}." ) diff --git a/src/transformers/modelcard.py b/src/transformers/modelcard.py index 0dfcc17a9d..52f385fd07 100644 --- a/src/transformers/modelcard.py +++ b/src/transformers/modelcard.py @@ -446,7 +446,7 @@ class TrainingSummary: if "task" in result and "dataset" in result and "metrics" in result: model_index["results"].append(result) else: - logger.info(f"Dropping the following result as it does not have all the necessary field:\n{result}") + logger.info(f"Dropping the following result as it does not have all the necessary fields:\n{result}") return [model_index]