Skip to content

Commit

Permalink
Have even longer wait time to make sure the reset job is complete
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-groundlight committed Aug 26, 2024
1 parent b3e9d11 commit f859ccf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/unit/test_detector_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ def test_reset(gl_experimental: ExperimentalApi):
det = gl_experimental.create_detector(f"Test {datetime.utcnow()}", "test_query")
iq = gl_experimental.submit_image_query(det, "test/assets/cat.jpeg")
gl_experimental.reset_detector(det.id)
time.sleep(300)
time.sleep(900)
with pytest.raises(NotFoundException):
gl_experimental.get_image_query(iq.id)


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?")
iq = gl_experimental.submit_image_query(det, "test/assets/cat.jpeg")
assert iq.result.confidence < 0.6
assert iq.result.confidence < LOW_CONFIDENCE_THRESHOLD

0 comments on commit f859ccf

Please sign in to comment.