Skip to content

Commit 21637d5

Browse files
committed
fixed last test
1 parent f60292c commit 21637d5

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

libs/labelbox/src/labelbox/data/annotation_types/metrics/scalar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ScalarMetric(BaseMetric):
3131
"""
3232
metric_name: Optional[str] = None
3333
value: Union[ScalarMetricValue, ScalarMetricConfidenceValue]
34-
aggregation: ScalarMetricAggregation = ScalarMetricAggregation.ARITHMETIC_MEAN.value
34+
aggregation: ScalarMetricAggregation = ScalarMetricAggregation.ARITHMETIC_MEAN
3535

3636
@field_validator('metric_name')
3737
def validate_metric_name(cls, name: Union[str, None]):

libs/labelbox/tests/data/annotation_types/test_metrics.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,12 @@ def test_legacy_scalar_metric():
1919
'uid': 'ckrmd9q8g000009mg6vej7hzg',
2020
},
2121
'annotations': [{
22-
'aggregation': 'ARITHMETIC_MEAN',
22+
'aggregation': ScalarMetricAggregation.ARITHMETIC_MEAN,
2323
'value': 10.0,
2424
'extra': {},
2525
}],
2626
'extra': {},
2727
}
28-
from pprint import pprint
29-
pprint(label.model_dump(exclude_none=True))
30-
pprint(expected)
3128
assert label.model_dump(exclude_none=True) == expected
3229

3330

0 commit comments

Comments
 (0)