Skip to content
Snippets Groups Projects
Commit 5e5d7541 authored by Max Kimmich's avatar Max Kimmich
Browse files

Log invalid answer as debug to not pollute terminal

parent bbce7ee4
No related branches found
No related tags found
No related merge requests found
...@@ -49,7 +49,7 @@ class TextClassification(Task): ...@@ -49,7 +49,7 @@ class TextClassification(Task):
class_mapping = self._get_label_mapping() class_mapping = self._get_label_mapping()
response = response.lower() response = response.lower()
if response not in class_mapping: if response not in class_mapping:
logger.warning(f"Invalid answer: {response}") logger.debug(f"Invalid answer: {response}")
return "failed" return "failed"
prediction = class_mapping[response] prediction = class_mapping[response]
classification_result = "incorrect" if prediction != gold_label else "correct" classification_result = "incorrect" if prediction != gold_label else "correct"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment