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
This commit is contained in:
Matthew Goldey
2021-10-26 16:36:26 -04:00
committed by GitHub
parent 41dad89f70
commit 42bfb83d74
2 changed files with 2 additions and 2 deletions

View File

@@ -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)}."
) )

View File

@@ -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]