-
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.
Consider the async case for internal functions
- Loading branch information
1 parent
ee5d7e1
commit b5e35ec
Showing
3 changed files
with
18 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,13 @@ | ||
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) | ||
|