Skip to content

Commit 7092001

Browse files
codethewebHammadB
andauthored
[BLD] Speed up embeddings test (#2126)
`chromadb/test/property/test_embeddings.py`: ~40m -> ~20m (would likely continue to benefit from additional cores) Hoping to continue enabling test parallelization on a test file basis (with the end goal of all tests being parallelized). --------- Co-authored-by: hammadb <[email protected]>
1 parent aa5dcc7 commit 7092001

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/_python-tests.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ jobs:
2525
"chromadb/test/property/test_embeddings.py",
2626
"chromadb/test/property/test_filtering.py",
2727
"chromadb/test/property/test_persist.py"]
28+
include:
29+
- test-globs: "chromadb/test/property/test_embeddings.py"
30+
parallelized: true
31+
2832
runs-on: ${{ matrix.platform }}
2933
steps:
3034
- uses: actions/checkout@v3
@@ -33,7 +37,7 @@ jobs:
3337
with:
3438
python-version: ${{ matrix.python }}
3539
- name: Test
36-
run: python -m pytest ${{ matrix.test-globs }}
40+
run: python -m pytest ${{ matrix.parallelized && '-n auto' || '' }} ${{ matrix.test-globs }}
3741
shell: bash
3842

3943
# todo: break out stress integration tests

requirements_dev.txt

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ mypy-protobuf
88
pre-commit
99
pytest
1010
pytest-asyncio
11+
pytest-xdist
1112
setuptools_scm
1213
types-protobuf
1314
types-requests==2.30.0.0

0 commit comments

Comments
 (0)