From 681adc2329943b9d75d7171826ce35ae185da6e3 Mon Sep 17 00:00:00 2001 From: Peter Eastman Date: Fri, 23 Aug 2024 14:20:06 -0700 Subject: [PATCH] Update Mac build to newer versions (#153) * Update Mac build to newer versions * Fixed filename * Debugging * Try a more tolerant check --- .github/workflows/CI.yml | 8 ++++---- .../{build-macos-11.yml => build-macos-latest.yml} | 0 python/tests/TestTorchForce.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename devtools/conda-envs/{build-macos-11.yml => build-macos-latest.yml} (100%) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ce13060..b36a6e7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -30,13 +30,13 @@ jobs: python-version: "3.10" pytorch-version: "2.1.*" - - name: MacOS (Python 3.9, PyTorch 1.9) - os: macos-11 + - name: MacOS (Python 3.11, PyTorch 2.4) + os: macos-latest cuda-version: "" gcc-version: "" nvcc-version: "" - python-version: "3.9" - pytorch-version: "1.9.*" # Some test fails with 1.10 + python-version: "3.11" + pytorch-version: "2.4.*" steps: diff --git a/devtools/conda-envs/build-macos-11.yml b/devtools/conda-envs/build-macos-latest.yml similarity index 100% rename from devtools/conda-envs/build-macos-11.yml rename to devtools/conda-envs/build-macos-latest.yml diff --git a/python/tests/TestTorchForce.py b/python/tests/TestTorchForce.py index 177551e..6eefed6 100644 --- a/python/tests/TestTorchForce.py +++ b/python/tests/TestTorchForce.py @@ -87,7 +87,7 @@ def forward(self, positions): assert self.positions.device == self.device assert positions.device == self.device assert positions.dtype == self.dtype - assert pt.all(positions == self.positions) + assert pt.allclose(positions, self.positions) return pt.sum(positions) with NamedTemporaryFile() as fd: