Unverified Commit 42bfb83d authored by Matthew Goldey's avatar Matthew Goldey Committed by GitHub
Browse files

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
parent 41dad89f
...@@ -356,7 +356,7 @@ def main(): ...@@ -356,7 +356,7 @@ def main():
if data_args.text_column_name not in raw_datasets["train"].column_names: if data_args.text_column_name not in raw_datasets["train"].column_names:
raise ValueError( 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 " "Make sure to set `--text_column_name` to the correct text column - one of "
f"{', '.join(raw_datasets['train'].column_names)}." f"{', '.join(raw_datasets['train'].column_names)}."
) )
......
...@@ -446,7 +446,7 @@ class TrainingSummary: ...@@ -446,7 +446,7 @@ class TrainingSummary:
if "task" in result and "dataset" in result and "metrics" in result: if "task" in result and "dataset" in result and "metrics" in result:
model_index["results"].append(result) model_index["results"].append(result)
else: 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] return [model_index]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment