Run --slow tests for Raspberry Pi (#10132)
This commit is contained in:
parent
0ad01399cd
commit
626309d221
2 changed files with 10 additions and 11 deletions
3
.github/workflows/ci.yaml
vendored
3
.github/workflows/ci.yaml
vendored
|
|
@ -246,8 +246,7 @@ jobs:
|
|||
pip list
|
||||
- name: Pytest tests
|
||||
run: |
|
||||
# pytest --slow tests/ # WARNING: Slow tests fail on Explorer Tests https://github.com/ultralytics/ultralytics/actions/runs/8715976528/job/23908727539?pr=10097
|
||||
pytest tests/
|
||||
pytest --slow tests/
|
||||
|
||||
Conda:
|
||||
if: github.repository == 'ultralytics/ultralytics' && (github.event_name == 'schedule' || github.event.inputs.conda == 'true')
|
||||
|
|
|
|||
|
|
@ -10,18 +10,18 @@ from ultralytics.utils import ASSETS
|
|||
@pytest.mark.slow
|
||||
def test_similarity():
|
||||
"""Test similarity calculations and SQL queries for correctness and response length."""
|
||||
exp = Explorer()
|
||||
exp = Explorer(data="coco8.yaml")
|
||||
exp.create_embeddings_table()
|
||||
similar = exp.get_similar(idx=1)
|
||||
assert len(similar) == 25
|
||||
similar = exp.get_similar(img=ASSETS / "zidane.jpg")
|
||||
assert len(similar) == 25
|
||||
similar = exp.get_similar(idx=[1, 2], limit=10)
|
||||
assert len(similar) == 10
|
||||
assert len(similar) == 4
|
||||
similar = exp.get_similar(img=ASSETS / "bus.jpg")
|
||||
assert len(similar) == 4
|
||||
similar = exp.get_similar(idx=[1, 2], limit=2)
|
||||
assert len(similar) == 2
|
||||
sim_idx = exp.similarity_index()
|
||||
assert len(sim_idx) > 0
|
||||
sql = exp.sql_query("WHERE labels LIKE '%person%'")
|
||||
assert len(sql) > 0
|
||||
assert len(sim_idx) == 4
|
||||
sql = exp.sql_query("WHERE labels LIKE '%zebra%'")
|
||||
assert len(sql) == 1
|
||||
|
||||
|
||||
@pytest.mark.slow
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue