Skip to content

Commit

Permalink
revert change for multilabel check
Browse files Browse the repository at this point in the history
  • Loading branch information
DhruvaBansal00 committed Oct 23, 2024
1 parent 9adf432 commit d419584
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/autolabel/tasks/attribute_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,22 +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}"
)
if len(filtered_attr_labels) == 0:
llm_label.pop(attribute["name"], None)
return LLMAnnotation(
curr_sample=pickle.dumps(curr_sample),
successfully_labeled=successfully_labeled,
Expand Down

0 comments on commit d419584

Please sign in to comment.