Skip to content

Commit 0ec63fa

Browse files
author
Matt Sokoloff
committed
bug fix
1 parent 673e836 commit 0ec63fa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

labelbox/data/metrics/iou.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ def classification_miou(predictions: List[ClassificationTool],
5555
prediction, label = predictions[0], labels[0]
5656

5757
if type(prediction) != type(label):
58-
raise Type
58+
raise TypeError(
59+
"Classification features must be the same type to compute agreement. "
60+
f"Found `{type(prediction)}` and `{type(label)}`")
5961

6062
if isinstance(prediction, NDText):
6163
return float(prediction.answer == label.answer)

0 commit comments

Comments
 (0)