From 63d30832e107d981963f03b248cbc84200983508 Mon Sep 17 00:00:00 2001 From: Zachary Ferguson Date: Tue, 21 Apr 2026 10:58:43 -0400 Subject: [PATCH 1/4] Disable Numpy AVX512 and SSE 4.2 in Python CI --- .github/workflows/python.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 2bbdd9551..7a1b9e1f2 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -23,6 +23,8 @@ jobs: Build: name: ${{ matrix.name }} Python ${{ matrix.python-version }} runs-on: ${{ matrix.os }} + env: + NPY_DISABLE_CPU_FEATURES: "AVX512F,AVX512_SKX,SSE4_2" strategy: fail-fast: false matrix: From 30fb4a52f6dca860013b7899900d092b04a42a34 Mon Sep 17 00:00:00 2001 From: Zachary Ferguson Date: Tue, 21 Apr 2026 11:07:45 -0400 Subject: [PATCH 2/4] Update numpy installation to no-binary source Reinstall numpy from source to ensure compatibility with the runner's CPU. --- .github/workflows/python.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 7a1b9e1f2..e30a8216f 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -85,5 +85,8 @@ jobs: - name: Tests run: | + # Reinstall numpy from source (no-binary) so it compiles for the runner's CPU + pip uninstall -y numpy + pip install --no-binary numpy numpy pip install -r python/tests/requirements.txt nose2 -v --pretty-assert -s python/tests From 255ef773115dcb4ec98138275a674bc03c928944 Mon Sep 17 00:00:00 2001 From: Zachary Ferguson Date: Tue, 21 Apr 2026 11:36:56 -0400 Subject: [PATCH 3/4] Modify CI workflow to use a virtual environment Updated the workflow to create a virtual environment and install NumPy from source within it before running tests. --- .github/workflows/python.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index e30a8216f..e1336ff92 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -85,8 +85,17 @@ jobs: - name: Tests run: | - # Reinstall numpy from source (no-binary) so it compiles for the runner's CPU - pip uninstall -y numpy + # 1. Create a clean virtual environment + python -m venv venv + source venv/bin/activate + + # 2. Install NumPy from source WITHIN the venv + # Use --force-reinstall to ensure we aren't pulling from the global cache pip install --no-binary numpy numpy + + # 3. Install your project and test requirements + pip install . pip install -r python/tests/requirements.txt + + # 4. Run tests using the venv's nose2 nose2 -v --pretty-assert -s python/tests From 3fea7bb772d8eef096b369d170275746a0912a27 Mon Sep 17 00:00:00 2001 From: Zachary Ferguson Date: Tue, 21 Apr 2026 11:53:15 -0400 Subject: [PATCH 4/4] Modify Scipy installation in Python workflow Updated NumPy installation to include SciPy and removed force-reinstall option. --- .github/workflows/python.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index e1336ff92..ae669ee5c 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -90,10 +90,9 @@ jobs: source venv/bin/activate # 2. Install NumPy from source WITHIN the venv - # Use --force-reinstall to ensure we aren't pulling from the global cache - pip install --no-binary numpy numpy - - # 3. Install your project and test requirements + pip install --no-binary numpy,scipy numpy scipy + + # 3. Install the project and test requirements pip install . pip install -r python/tests/requirements.txt