diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index fb677eab8e..ba961deb04 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -45,6 +45,7 @@ jobs: with: fetch-depth: 0 lfs: true + - uses: rui314/setup-mold@v1 - name: Set up Python uses: actions/setup-python@v5 with: @@ -95,6 +96,7 @@ jobs: with: fetch-depth: 0 lfs: true + - uses: rui314/setup-mold@v1 - name: Set up Python uses: actions/setup-python@v5 with: @@ -132,6 +134,7 @@ jobs: with: fetch-depth: 0 lfs: true + - uses: rui314/setup-mold@v1 - name: Set up Python uses: actions/setup-python@v5 with: diff --git a/python/Makefile b/python/Makefile index f51fe8c65c..e008ec99bc 100644 --- a/python/Makefile +++ b/python/Makefile @@ -1,7 +1,7 @@ ifeq ($(CI), true) - PYTEST_ARGS = -vvv -s --durations=30 + PYTEST_ARGS = -vvv -s -n auto --durations=30 else - PYTEST_ARGS = -vvv -s + PYTEST_ARGS = -vvv -s -n auto endif test: diff --git a/python/pyproject.toml b/python/pyproject.toml index dd192090e4..a9f7ca96d2 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -54,6 +54,7 @@ tests = [ "pandas", "polars[pyarrow,pandas]", "pytest", + "pytest-xdist", "tensorflow", "tqdm", ] diff --git a/python/python/tests/test_indices.py b/python/python/tests/test_indices.py index 26ab6e9916..bb6ffe0556 100644 --- a/python/python/tests/test_indices.py +++ b/python/python/tests/test_indices.py @@ -11,9 +11,9 @@ from lance.file import LanceFileReader from lance.indices import IndicesBuilder, IvfModel, PqModel -NUM_ROWS_PER_FRAGMENT = 10000 -DIMENSION = 128 -NUM_SUBVECTORS = 8 +NUM_ROWS_PER_FRAGMENT = 2_000 +DIMENSION = 32 +NUM_SUBVECTORS = 2 NUM_FRAGMENTS = 3 NUM_ROWS = NUM_ROWS_PER_FRAGMENT * NUM_FRAGMENTS NUM_PARTITIONS = round(np.sqrt(NUM_ROWS)) @@ -244,7 +244,7 @@ def test_vector_transform(tmpdir, small_rand_dataset, small_rand_ivf, small_rand assert row_id.type == pa.uint64() pq_code = data.column("__pq_code") - assert pq_code.type == pa.list_(pa.uint8(), 8) + assert pq_code.type == pa.list_(pa.uint8(), NUM_SUBVECTORS) part_id = data.column("__ivf_part_id") assert part_id.type == pa.uint32()