-
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.
temporary fix for how iqs can be returned (#298)
Co-authored-by: Auto-format Bot <[email protected]>
- Loading branch information
1 parent
d9b8297
commit 545f6fa
Showing
3 changed files
with
28 additions
and
5 deletions.
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 |
---|---|---|
@@ -1,14 +1,19 @@ | ||
from groundlight import ExperimentalApi | ||
from groundlight.internalapi import iq_is_answered, iq_is_confident | ||
from model import ImageQuery | ||
|
||
|
||
def test_iq_is_confident(gl_experimental: ExperimentalApi): | ||
def test_iq_is_confident(gl_experimental: ExperimentalApi, initial_iq: ImageQuery): | ||
det = gl_experimental.get_or_create_detector("Test", "test_query") | ||
iq = gl_experimental.ask_async(det, image="test/assets/dog.jpeg") | ||
assert not iq_is_confident(iq, 0.9) | ||
|
||
assert not iq_is_confident(initial_iq, 0.9) | ||
|
||
def test_iq_is_answered(gl_experimental: ExperimentalApi): | ||
|
||
def test_iq_is_answered(gl_experimental: ExperimentalApi, initial_iq: ImageQuery): | ||
det = gl_experimental.get_or_create_detector("Test", "test_query") | ||
iq = gl_experimental.ask_async(det, image="test/assets/dog.jpeg") | ||
assert not iq_is_answered(iq) | ||
|
||
assert not iq_is_answered(initial_iq) |