File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
src/labelbox/data/annotation_types/metrics
tests/data/annotation_types Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class ScalarMetric(BaseMetric):
31
31
"""
32
32
metric_name : Optional [str ] = None
33
33
value : Union [ScalarMetricValue , ScalarMetricConfidenceValue ]
34
- aggregation : ScalarMetricAggregation = ScalarMetricAggregation .ARITHMETIC_MEAN . value
34
+ aggregation : ScalarMetricAggregation = ScalarMetricAggregation .ARITHMETIC_MEAN
35
35
36
36
@field_validator ('metric_name' )
37
37
def validate_metric_name (cls , name : Union [str , None ]):
Original file line number Diff line number Diff line change @@ -19,15 +19,12 @@ def test_legacy_scalar_metric():
19
19
'uid' : 'ckrmd9q8g000009mg6vej7hzg' ,
20
20
},
21
21
'annotations' : [{
22
- 'aggregation' : ' ARITHMETIC_MEAN' ,
22
+ 'aggregation' : ScalarMetricAggregation . ARITHMETIC_MEAN ,
23
23
'value' : 10.0 ,
24
24
'extra' : {},
25
25
}],
26
26
'extra' : {},
27
27
}
28
- from pprint import pprint
29
- pprint (label .model_dump (exclude_none = True ))
30
- pprint (expected )
31
28
assert label .model_dump (exclude_none = True ) == expected
32
29
33
30
You can’t perform that action at this time.
0 commit comments