Skip to content

Commit c80e000

Browse files
brandon-wadaAuto-format Bot
andauthored
Internal api bugfix fix (#297)
Co-authored-by: Auto-format Bot <[email protected]>
1 parent 9d153a4 commit c80e000

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

test/integration/test_groundlight.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
CountingResult,
2121
Detector,
2222
ImageQuery,
23+
MultiClassificationResult,
2324
PaginatedDetectorList,
2425
PaginatedImageQueryList,
2526
)
@@ -30,7 +31,11 @@
3031

3132
def is_valid_display_result(result: Any) -> bool:
3233
"""Is the image query result valid to display to the user?."""
33-
if not isinstance(result, BinaryClassificationResult) and not isinstance(result, CountingResult):
34+
if (
35+
not isinstance(result, BinaryClassificationResult)
36+
and not isinstance(result, CountingResult)
37+
and not isinstance(result, MultiClassificationResult)
38+
):
3439
return False
3540
if not is_valid_display_label(result.label):
3641
return False

test/unit/test_internalapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
def test_iq_is_confident(gl_experimental: ExperimentalApi):
66
det = gl_experimental.get_or_create_detector("Test", "test_query")
7-
iq = gl_experimental.ask_async(det, image="test/assets/dog.jpeg", wait=10)
7+
iq = gl_experimental.ask_async(det, image="test/assets/dog.jpeg")
88
assert not iq_is_confident(iq, 0.9)
99

1010

1111
def test_iq_is_answered(gl_experimental: ExperimentalApi):
1212
det = gl_experimental.get_or_create_detector("Test", "test_query")
13-
iq = gl_experimental.ask_async(det, image="test/assets/dog.jpeg", wait=10)
13+
iq = gl_experimental.ask_async(det, image="test/assets/dog.jpeg")
1414
assert not iq_is_answered(iq)

0 commit comments

Comments
 (0)