diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index 82c69a1..561b9ff 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -72,6 +72,10 @@ jobs: test-high-level: runs-on: ubuntu-latest + env: + OMP_NUM_THREADS: '1' + MKL_NUM_THREADS: '1' + OPENBLAS_NUM_THREADS: '1' steps: - name: Check out repository uses: actions/checkout@v2 @@ -81,8 +85,9 @@ jobs: python-version: '3.10' - name: Install high-level dependencies run: | + pip install "numba>=0.62.0" pip install -r tests/requirements-core.txt - pip install numba + pip install --upgrade numpy - name: Run high-level tests run: | python -X faulthandler -m unittest discover tests/high_level diff --git a/bm25s/high_level.py b/bm25s/high_level.py index e179738..69b2208 100644 --- a/bm25s/high_level.py +++ b/bm25s/high_level.py @@ -73,8 +73,8 @@ def __init__( return_as="tuple", ) - # compile and index - self.retriever.compile(activate_numba=True, warmup=True) + # compile and index (warmup=False to avoid segfaults in some CI environments) + self.retriever.compile(activate_numba=True, warmup=False) create_empty_token = True # If the corpus is empty or has no tokens, we can't create an empty token