From 57d0d15b5afd383edcd78d1180a42202ebecb087 Mon Sep 17 00:00:00 2001 From: Dhruva Bansal Date: Wed, 23 Oct 2024 15:23:03 -0700 Subject: [PATCH] Revert change for multilabel filter (#925) * Pop multilabel label if empty * revert change for multilabel check --- src/autolabel/tasks/attribute_extraction.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/autolabel/tasks/attribute_extraction.py b/src/autolabel/tasks/attribute_extraction.py index a2fee555..35e59c93 100644 --- a/src/autolabel/tasks/attribute_extraction.py +++ b/src/autolabel/tasks/attribute_extraction.py @@ -353,20 +353,6 @@ def parse_llm_response( f"Attribute {attr_label} from the LLM response {llm_label} is not in the labels list" ) llm_label.pop(attribute["name"], None) - elif attr_type == TaskType.MULTILABEL_CLASSIFICATION: - original_attr_labels = attr_label.split( - self.config.label_separator() - ) - filtered_attr_labels = list( - filter(lambda x: x in attr_options, original_attr_labels) - ) - llm_label[ - attribute["name"] - ] = self.config.label_separator().join(filtered_attr_labels) - if len(filtered_attr_labels) != len(original_attr_labels): - logger.warning( - f"Attribute {attr_label} from the LLM response {llm_label} is not in the labels list. Filtered list: {filtered_attr_labels}" - ) return LLMAnnotation( curr_sample=pickle.dumps(curr_sample), successfully_labeled=successfully_labeled,