From e78c8f040c93fc60f7b0e7cceea8165911f2e499 Mon Sep 17 00:00:00 2001 From: Auto-format Bot Date: Fri, 24 Jan 2025 14:14:28 +0000 Subject: [PATCH] Automatically reformatting code with black and isort --- test/integration/integration_test.py | 29 +++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/test/integration/integration_test.py b/test/integration/integration_test.py index 40f84124..33cd3a0a 100644 --- a/test/integration/integration_test.py +++ b/test/integration/integration_test.py @@ -10,6 +10,7 @@ import argparse import random import time + from groundlight import Groundlight, GroundlightClientError from model import Detector @@ -85,10 +86,12 @@ def submit_initial(detector: Detector) -> str: # a bit dependent on the current default model, # but that one always defaults to 0.5 confidence at first. - assert 0.5 <= iq_yes.result.confidence <= 0.55, \ - f"Expected confidence to be between 0.5 and 0.55, but got {iq_yes.result.confidence}" - assert 0.5 <= iq_no.result.confidence <= 0.55, \ - f"Expected confidence to be between 0.5 and 0.55, but got {iq_no.result.confidence}" + assert ( + 0.5 <= iq_yes.result.confidence <= 0.55 + ), f"Expected confidence to be between 0.5 and 0.55, but got {iq_yes.result.confidence}" + assert ( + 0.5 <= iq_no.result.confidence <= 0.55 + ), f"Expected confidence to be between 0.5 and 0.55, but got {iq_no.result.confidence}" def improve_model(detector: Detector): @@ -112,15 +115,15 @@ def submit_final(detector: Detector): iq_no = _submit_dog(detector, confidence_threshold=0.5) end_time = time.time() print(f"Time taken to get high confidence response from edge: {end_time - start_time} seconds") - assert iq_yes.result.confidence > ACCETABLE_TRAINED_CONFIDENCE, \ - f"Expected confidence to be greater than {ACCETABLE_TRAINED_CONFIDENCE}, but got {iq_yes.result.confidence}" - assert iq_yes.result.label.value == "YES", \ - f"Expected label to be YES, but got {iq_yes.result.label.value}" - - assert iq_no.result.confidence > ACCETABLE_TRAINED_CONFIDENCE, \ - f"Expected confidence to be greater than {ACCETABLE_TRAINED_CONFIDENCE}, but got {iq_no.result.confidence}" - assert iq_no.result.label.value == "NO", \ - f"Expected label to be NO, but got {iq_no.result.label.value}" + assert ( + iq_yes.result.confidence > ACCETABLE_TRAINED_CONFIDENCE + ), f"Expected confidence to be greater than {ACCETABLE_TRAINED_CONFIDENCE}, but got {iq_yes.result.confidence}" + assert iq_yes.result.label.value == "YES", f"Expected label to be YES, but got {iq_yes.result.label.value}" + + assert ( + iq_no.result.confidence > ACCETABLE_TRAINED_CONFIDENCE + ), f"Expected confidence to be greater than {ACCETABLE_TRAINED_CONFIDENCE}, but got {iq_no.result.confidence}" + assert iq_no.result.label.value == "NO", f"Expected label to be NO, but got {iq_no.result.label.value}" def _submit_cat(detector: Detector, confidence_threshold: float, wait: int = None):