Skip to content

Commit

Permalink
mark test as slow
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-groundlight committed Feb 25, 2025
1 parent 45682de commit 407d084
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/unit/test_metrics_and_evaluation.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
from datetime import datetime
import time

from groundlight import ExperimentalApi
import pytest

from groundlight import ExperimentalApi

@pytest.mark.skip(reason="Slow")
def test_metrics_and_evaluation(gl_experimental: ExperimentalApi):
name = f"Test metrics and evaluation {datetime.utcnow()}"
det = gl_experimental.create_detector(name, "test_query")
for i in range(6):
for i in range(10):
iq = gl_experimental.submit_image_query(
det, "test/assets/cat.jpeg", wait=0, patience_time=10, human_review="NEVER"
)
Expand All @@ -15,6 +18,9 @@ def test_metrics_and_evaluation(gl_experimental: ExperimentalApi):
det, "test/assets/cat.jpeg", wait=0, patience_time=10, human_review="NEVER"
)
gl_experimental.add_label(iq, "NO")

time.sleep(120) # Wait for the metrics to be updated

metrics = gl_experimental.get_detector_metrics(det.id)
assert metrics["summary"] is not None
assert metrics["summary"]["num_ground_truth"] is not None
Expand Down

0 comments on commit 407d084

Please sign in to comment.