Fixed log messages that are resulting in TypeError due to too many arguments (#32017)

* Fixed log messages that are resulting in TypeErrors due to too many arguments.

* Removed un-necessary imports.
This commit is contained in:
Sai-Suraj-27
2024-07-17 15:26:44 +05:30
committed by GitHub
parent 691586b0dc
commit 72fb02c47d
10 changed files with 12 additions and 14 deletions

View File

@@ -326,7 +326,7 @@ def main():
label_to_id = {i: int(label_name_to_id[label_list[i]]) for i in range(num_labels)}
else:
logger.warning(
"Your model seems to have been trained with labels, but they don't match the dataset: ",
"Your model seems to have been trained with labels, but they don't match the dataset: "
f"model labels: {sorted(label_name_to_id.keys())}, dataset labels: {sorted(label_list)}."
"\nIgnoring the model labels as a result.",
)

View File

@@ -374,7 +374,7 @@ def main():
label_to_id = label_name_to_id # Use the model's labels
else:
logger.warning(
"Your model seems to have been trained with labels, but they don't match the dataset: ",
"Your model seems to have been trained with labels, but they don't match the dataset: "
f"model labels: {sorted(label_name_to_id.keys())}, dataset labels:"
f" {sorted(label_list)}.\nIgnoring the model labels as a result.",
)