Skip to content

Commit

Permalink
Turn label list back into a list after using set union to merge diffe…
Browse files Browse the repository at this point in the history
…rent label sets.
  • Loading branch information
tmills committed Aug 18, 2023
1 parent eade31b commit 0753656
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cnlpt/cnlp_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ def _reconcile_labels_lists(self, processor):
raise Exception("The same task name has disjoint sets of labels in different dataset: %s vs. %s" % (str(old_labels), str(new_labels)))
elif new_labels != old_labels:
logger.warn("Two different datasets have the same task name but not completely equal label lists: %s vs. %s. We will merge them." % (str(old_labels), str(new_labels)))
self.tasks_to_labels[task] = old_labels.union(new_labels)
self.tasks_to_labels[task] = list(old_labels.union(new_labels))
else:
## they match completely, nothing to be done
pass
Expand Down

0 comments on commit 0753656

Please sign in to comment.