From a1087458d4e0702d0f939a2897ce87361252df04 Mon Sep 17 00:00:00 2001 From: brandon Date: Wed, 4 Sep 2024 17:28:27 -0700 Subject: [PATCH 1/2] Human labels currently return with None confidence. Explains most of the current observations --- test/unit/test_detector_reset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/test_detector_reset.py b/test/unit/test_detector_reset.py index db3ef1f0..b37b2899 100644 --- a/test/unit/test_detector_reset.py +++ b/test/unit/test_detector_reset.py @@ -28,7 +28,7 @@ def test_reset_retry(gl_experimental: ExperimentalApi): def test_reset_training(gl_experimental: ExperimentalApi): # If we reset a detector, we should have low confidence after the reset low_confidence_threshold = 0.6 - det = gl_experimental.get_or_create_detector("Test Detector for Resets", "is this a cat?") + det = gl_experimental.get_or_create_detector("Test Detector for Resets", "is this a cat?", confidence_threshold=0.5) gl_experimental.reset_detector(det.id) - iq = gl_experimental.submit_image_query(det, "test/assets/cat.jpeg") + iq = gl_experimental.submit_image_query(det, "test/assets/cat.jpeg", human_review="NEVER") assert iq.result.confidence < low_confidence_threshold From 9b1c61a0c67454267d1871210a4258de91b17949 Mon Sep 17 00:00:00 2001 From: brandon Date: Wed, 4 Sep 2024 17:32:29 -0700 Subject: [PATCH 2/2] we don't need it --- test/unit/test_detector_reset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/test_detector_reset.py b/test/unit/test_detector_reset.py index b37b2899..83393546 100644 --- a/test/unit/test_detector_reset.py +++ b/test/unit/test_detector_reset.py @@ -28,7 +28,7 @@ def test_reset_retry(gl_experimental: ExperimentalApi): def test_reset_training(gl_experimental: ExperimentalApi): # If we reset a detector, we should have low confidence after the reset low_confidence_threshold = 0.6 - det = gl_experimental.get_or_create_detector("Test Detector for Resets", "is this a cat?", confidence_threshold=0.5) + det = gl_experimental.get_or_create_detector("Test Detector for Resets", "is this a cat?") gl_experimental.reset_detector(det.id) iq = gl_experimental.submit_image_query(det, "test/assets/cat.jpeg", human_review="NEVER") assert iq.result.confidence < low_confidence_threshold