-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Considering a case where ask_async returned image queries have no result --------- Co-authored-by: Auto-format Bot <[email protected]>
- Loading branch information
1 parent
ee5d7e1
commit 9d153a4
Showing
3 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from groundlight import ExperimentalApi | ||
from groundlight.internalapi import iq_is_answered, iq_is_confident | ||
|
||
|
||
def test_iq_is_confident(gl_experimental: ExperimentalApi): | ||
det = gl_experimental.get_or_create_detector("Test", "test_query") | ||
iq = gl_experimental.ask_async(det, image="test/assets/dog.jpeg", wait=10) | ||
assert not iq_is_confident(iq, 0.9) | ||
|
||
|
||
def test_iq_is_answered(gl_experimental: ExperimentalApi): | ||
det = gl_experimental.get_or_create_detector("Test", "test_query") | ||
iq = gl_experimental.ask_async(det, image="test/assets/dog.jpeg", wait=10) | ||
assert not iq_is_answered(iq) |