File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change 9
9
from typing_extensions import Literal
10
10
11
11
from ..annotation_types .feature import FeatureSchema
12
- from ..annotation_types import ObjectAnnotation , Label , LabelList , ClassificationAnnotation
12
+ from ..annotation_types import ObjectAnnotation , Label , LabelList
13
13
14
14
15
15
def get_identifying_key (
@@ -63,18 +63,6 @@ def all_have_key(features: List[FeatureSchema]) -> Tuple[bool, bool]:
63
63
return all_schemas , all_names
64
64
65
65
66
- def update_classification_answers (label : Label ):
67
- """
68
- This function is to update classifications' names to the answers. This prevents
69
- metrics from being calculated only at the description of the classification, and
70
- instead at the answer level.
71
- """
72
- for annotation in label .annotations :
73
- if isinstance (annotation , ClassificationAnnotation ):
74
- annotation .name = annotation .value .answer .name
75
- return label
76
-
77
-
78
66
def get_label_pairs (labels_a : LabelList ,
79
67
labels_b : LabelList ,
80
68
match_on = "uid" ,
@@ -124,8 +112,6 @@ def get_label_pairs(labels_a: LabelList,
124
112
)
125
113
else :
126
114
continue
127
- a , b = update_classification_answers (a ), update_classification_answers (
128
- b )
129
115
pairs [key ].extend ([a , b ])
130
116
return pairs
131
117
You can’t perform that action at this time.
0 commit comments