Skip to content

Commit

Permalink
Skips some tests that are currently causing problems
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-groundlight committed Oct 15, 2024
1 parent d9a20eb commit bcefe60
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,16 @@ TEST_ARGS=
CLOUD_FILTERS = -m "not run_only_for_edge_endpoint"
EDGE_FILTERS = -m "not skip_for_edge_endpoint"

# Record information about the slowest 25 tests (but don't show anything slower than 0.1 seconds)
PROFILING_ARGS = \
--durations 25 \
--durations-min 0.1

test: install ## Run tests against the prod API (needs GROUNDLIGHT_API_TOKEN)
${PYTEST} ${TEST_ARGS} ${CLOUD_FILTERS} test
${PYTEST} ${PROFILING_ARGS} ${TEST_ARGS} ${CLOUD_FILTERS} test

test-4edge: install ## Run tests against the prod API via the edge-endpoint (needs GROUNDLIGHT_API_TOKEN)
${PYTEST} ${TEST_ARGS} ${EDGE_FILTERS} test
${PYTEST} ${PROFILING_ARGS} ${TEST_ARGS} ${EDGE_FILTERS} test

test-local: install ## Run tests against a localhost API (needs GROUNDLIGHT_API_TOKEN and a local API server)
GROUNDLIGHT_ENDPOINT="http://localhost:8000/" ${PYTEST} ${TEST_ARGS} ${CLOUD_FILTERS} test
Expand Down
2 changes: 2 additions & 0 deletions test/unit/test_detector_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from groundlight_openapi_client.exceptions import NotFoundException


@pytest.mark.skip(reason="This is an expensive test, reset may take some time")
def test_reset_retry(gl_experimental: ExperimentalApi):
# Reset the detector, retrying in case the reset is still ongoing
det = gl_experimental.create_detector(f"Test {datetime.utcnow()}", "test_query")
Expand All @@ -25,6 +26,7 @@ def test_reset_retry(gl_experimental: ExperimentalApi):
raise Exception("Failed to reset detector")


@pytest.mark.skip(reason="This test does not work with strong 0 shot models, enabled by default based on your account")
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
Expand Down
7 changes: 6 additions & 1 deletion test/unit/test_experimental.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ def test_counting_detector(gl_experimental: ExperimentalApi):
count_iq = gl_experimental.submit_image_query(created_detector, "test/assets/dog.jpeg")
assert count_iq.result.count is not None


@pytest.mark.skip(
reason=(
"General users currently currently can't use multiclass detectors. If you have questions, reach out"
" to Groundlight support, or upgrade your plan."
)
)
def test_multiclass_detector(gl_experimental: ExperimentalApi):
"""
verify that we can create and submit to a multi-class detector
Expand Down

0 comments on commit bcefe60

Please sign in to comment.