Skip to content

Commit c2271c5

Browse files
committed
AL-4149: Dont lowercase metric name
1 parent d3d76ba commit c2271c5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

labelbox/data/annotation_types/metrics/scalar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def validate_metric_name(cls, name: str):
3939
if name.lower().strip() in RESERVED_METRIC_NAMES:
4040
raise ValueError(f"`{clean_name}` is a reserved metric name. "
4141
"Please provide another value for `metric_name`.")
42-
return clean_name
42+
return name
4343

4444
def dict(self, *args, **kwargs):
4545
res = super().dict(*args, **kwargs)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[{"uuid" : "a22bbf6e-b2da-4abe-9a11-df84759f7672","dataRow" : {"id": "ckrmdnqj4000007msh9p2a27r"}, "metricValue" : 0.1, "metricName" : "iou", "featureName" : "sample_class", "subclassName" : "sample_subclass", "aggregation" : "SUM"},
2-
{"uuid" : "a22bbf6e-b2da-4abe-9a11-df84759f7672","dataRow" : {"id": "ckrmdnqj4000007msh9p2a27r"}, "metricValue" : 0.1, "metricName" : "iou", "featureName" : "sample_class", "aggregation" : "SUM"},
3-
{"uuid" : "a22bbf6e-b2da-4abe-9a11-df84759f7672","dataRow" : {"id": "ckrmdnqj4000007msh9p2a27r"}, "metricValue" : { "0.1" : 0.1, "0.2" : 0.5}, "metricName" : "iou", "aggregation" : "SUM"}]
1+
[{"uuid" : "a22bbf6e-b2da-4abe-9a11-df84759f7672","dataRow" : {"id": "ckrmdnqj4000007msh9p2a27r"}, "metricValue" : 0.1, "metricName" : "custom_iou", "featureName" : "sample_class", "subclassName" : "sample_subclass", "aggregation" : "SUM"},
2+
{"uuid" : "a22bbf6e-b2da-4abe-9a11-df84759f7672","dataRow" : {"id": "ckrmdnqj4000007msh9p2a27r"}, "metricValue" : 0.1, "metricName" : "custom_iou", "featureName" : "sample_class", "aggregation" : "SUM"},
3+
{"uuid" : "a22bbf6e-b2da-4abe-9a11-df84759f7672","dataRow" : {"id": "ckrmdnqj4000007msh9p2a27r"}, "metricValue" : { "0.1" : 0.1, "0.2" : 0.5}, "metricName" : "custom_iou", "aggregation" : "SUM"}]

tests/data/metrics/iou/feature/test_feature_iou.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def check_iou(pair):
1313
assert math.isclose(result[key], pair.expected[key])
1414

1515
for metric in metrics:
16-
assert metric.metric_name == "iou"
16+
assert metric.metric_name == "custom_iou"
1717

1818
if len(pair.expected):
1919
assert len(one_metrics)

0 commit comments

Comments
 (0)