From 63a4fd67870eed0669b56cc8c13543ec5076750c Mon Sep 17 00:00:00 2001 From: cw-tan Date: Tue, 28 Oct 2025 21:18:55 -0400 Subject: [PATCH 1/4] loosen numpy dependency --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index dcf548b1..850f35b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ classifiers = [ requires-python = ">=3.12" dependencies = [ "h5py>=3.12.1", - "numpy>=2", + "numpy>=1.26,<3", "tables>=3.10.2", "torch>=2", "tqdm>=4.67", From 7aebd22fe210f2f0be1a72dc85e96eadd2aa5a74 Mon Sep 17 00:00:00 2001 From: cw-tan Date: Tue, 28 Oct 2025 23:23:53 -0400 Subject: [PATCH 2/4] test full matrix of python 3.12-3.13 and highest-lowest resolutions --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a1b57c44..73a7ac89 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,6 +19,8 @@ jobs: os: [ubuntu-latest, macos-14] version: - { python: '3.12', resolution: highest } + - { python: '3.12', resolution: lowest-direct } + - { python: '3.13', resolution: highest } - { python: '3.13', resolution: lowest-direct } runs-on: ${{ matrix.os }} @@ -56,6 +58,8 @@ jobs: os: [ubuntu-latest, macos-14] version: - { python: '3.12', resolution: highest } + - { python: '3.12', resolution: lowest-direct } + - { python: '3.13', resolution: highest } - { python: '3.13', resolution: lowest-direct } model: - { name: fairchem, test_path: "tests/models/test_fairchem.py" } From 6c485d9f32a175ba7266003cf8ff7cec2170362b Mon Sep 17 00:00:00 2001 From: cw-tan Date: Wed, 29 Oct 2025 00:22:18 -0400 Subject: [PATCH 3/4] use numpy>2 for python 3.13 in CI --- .github/workflows/test.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 73a7ac89..b3c5ffe2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,7 +39,12 @@ jobs: - name: Install torch_sim run: | uv pip install "torch>2" --index-url https://download.pytorch.org/whl/cpu --system - uv pip install -e ".[test]" --resolution=${{ matrix.version.resolution }} --system + # always use numpy>=2 with Python 3.13 + if [ "${{ matrix.version.python }}" = "3.13" ]; then + uv pip install -e ".[test]" "numpy>=2" --resolution=${{ matrix.version.resolution }} --system + else + uv pip install -e ".[test]" --resolution=${{ matrix.version.resolution }} --system + fi - name: Run core tests run: | @@ -120,7 +125,12 @@ jobs: - name: Install torch_sim with model dependencies if: ${{ matrix.model.name != 'fairchem-legacy' }} run: | - uv pip install -e ".[test,${{ matrix.model.name }}]" --resolution=${{ matrix.version.resolution }} --system + # always use numpy>=2 with Python 3.13 + if [ "${{ matrix.version.python }}" = "3.13" ]; then + uv pip install -e ".[test,${{ matrix.model.name }}]" "numpy>=2" --resolution=${{ matrix.version.resolution }} --system + else + uv pip install -e ".[test,${{ matrix.model.name }}]" --resolution=${{ matrix.version.resolution }} --system + fi - name: Run ${{ matrix.model.test_path }} tests if: ${{ !contains(matrix.model.name, 'fairchem') || github.event.pull_request.head.repo.fork == false }} From 145f40d47e38730f8cc40229b9370485e5092884 Mon Sep 17 00:00:00 2001 From: cw-tan Date: Wed, 29 Oct 2025 00:00:36 -0400 Subject: [PATCH 4/4] exclude orb and fairchem-legacy from CI with python 3.13 --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b3c5ffe2..90e8efe5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -81,8 +81,12 @@ jobs: exclude: - version: { python: '3.13', resolution: lowest-direct } model: { name: orb, test_path: "tests/models/test_orb.py" } + - version: { python: '3.13', resolution: highest } + model: { name: orb, test_path: "tests/models/test_orb.py" } - version: { python: '3.13', resolution: lowest-direct } model: { name: fairchem-legacy, test_path: "tests/models/test_fairchem_legacy.py" } + - version: { python: '3.13', resolution: highest } + model: { name: fairchem-legacy, test_path: "tests/models/test_fairchem_legacy.py" } runs-on: ${{ matrix.os }} steps: