From bc5723f9d3f3b6ad18fadb8ad5bb09e562d8d7ad Mon Sep 17 00:00:00 2001 From: Fabrice Normandin Date: Thu, 7 Nov 2024 09:30:51 -0500 Subject: [PATCH] Run unit tests on MacOS in CI (#83) * Run unit tests on MacOS in CI Signed-off-by: Fabrice Normandin * Remove specific cuda library reqs from 'gpu' extra Signed-off-by: Fabrice Normandin * Add a skipif mark on test for MacOS in CI Signed-off-by: Fabrice Normandin --------- Signed-off-by: Fabrice Normandin --- .github/workflows/build.yml | 2 +- project/main_test.py | 4 ++++ pyproject.toml | 15 +-------------- uv.lock | 29 ----------------------------- 4 files changed, 6 insertions(+), 44 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index db9008f5..70e93c2a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,7 +57,7 @@ jobs: strategy: max-parallel: 4 matrix: - platform: [ubuntu-latest] + platform: [ubuntu-latest, macos-latest] python-version: ["3.10"] steps: - uses: actions/checkout@v4 diff --git a/project/main_test.py b/project/main_test.py index dab992c9..a8ae8d15 100644 --- a/project/main_test.py +++ b/project/main_test.py @@ -223,6 +223,10 @@ def test_example_experiment_defaults(experiment_config: Config) -> None: ) +@pytest.mark.skipif( + IN_GITHUB_CI and sys.platform == "darwin", + reason="TODO: Getting a 'MPS backend out of memory' error on the Github CI. ", +) @pytest.mark.parametrize( command_line_overrides.__name__, [ diff --git a/pyproject.toml b/pyproject.toml index dd6f3b42..beb5baa3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,20 +61,7 @@ docs = [ "mkdocs-macros-plugin>=1.0.5", ] gpu = [ - "jax[cuda12]>=0.4.31", - "nvidia-cublas-cu12==12.1.3.1", - "nvidia-cuda-cupti-cu12==12.1.105", - "nvidia-cuda-nvcc-cu12==12.6.68", - "nvidia-cuda-nvrtc-cu12==12.1.105", - "nvidia-cuda-runtime-cu12==12.1.105", - "nvidia-cudnn-cu12==9.1.0.70", - "nvidia-cufft-cu12==11.0.2.54", - "nvidia-curand-cu12==10.3.2.106", - "nvidia-cusolver-cu12==11.4.5.107", - "nvidia-cusparse-cu12==12.1.0.106", - "nvidia-nccl-cu12==2.20.5", - "nvidia-nvjitlink-cu12==12.6.68", - "nvidia-nvtx-cu12==12.1.105", + "jax[cuda12]>=0.4.31" ] [build-system] diff --git a/uv.lock b/uv.lock index 72853646..6a47173e 100644 --- a/uv.lock +++ b/uv.lock @@ -2670,7 +2670,6 @@ version = "12.1.105" source = { registry = "https://pypi.org/simple" } wheels = [ { url = "https://files.pythonhosted.org/packages/b6/9f/c64c03f49d6fbc56196664d05dba14e3a561038a81a638eeb47f4d4cfd48/nvidia_cuda_nvrtc_cu12-12.1.105-py3-none-manylinux1_x86_64.whl", hash = "sha256:339b385f50c309763ca65456ec75e17bbefcbbf2893f462cb8b90584cd27a1c2", size = 23671734 }, - { url = "https://files.pythonhosted.org/packages/ad/1d/f76987c4f454eb86e0b9a0e4f57c3bf1ac1d13ad13cd1a4da4eb0e0c0ce9/nvidia_cuda_nvrtc_cu12-12.1.105-py3-none-win_amd64.whl", hash = "sha256:0a98a522d9ff138b96c010a65e145dc1b4850e9ecb75a0172371793752fd46ed", size = 19331863 }, ] [[package]] @@ -2709,7 +2708,6 @@ version = "10.3.2.106" source = { registry = "https://pypi.org/simple" } wheels = [ { url = "https://files.pythonhosted.org/packages/44/31/4890b1c9abc496303412947fc7dcea3d14861720642b49e8ceed89636705/nvidia_curand_cu12-10.3.2.106-py3-none-manylinux1_x86_64.whl", hash = "sha256:9d264c5036dde4e64f1de8c50ae753237c12e0b1348738169cd0f8a536c0e1e0", size = 56467784 }, - { url = "https://files.pythonhosted.org/packages/5c/97/4c9c7c79efcdf5b70374241d48cf03b94ef6707fd18ea0c0f53684931d0b/nvidia_curand_cu12-10.3.2.106-py3-none-win_amd64.whl", hash = "sha256:75b6b0c574c0037839121317e17fd01f8a69fd2ef8e25853d826fec30bdba74a", size = 55995813 }, ] [[package]] @@ -2763,7 +2761,6 @@ version = "12.1.105" source = { registry = "https://pypi.org/simple" } wheels = [ { url = "https://files.pythonhosted.org/packages/da/d3/8057f0587683ed2fcd4dbfbdfdfa807b9160b809976099d36b8f60d08f03/nvidia_nvtx_cu12-12.1.105-py3-none-manylinux1_x86_64.whl", hash = "sha256:dc21cf308ca5691e7c04d962e213f8a4aa9bbfa23d95412f452254c2caeb09e5", size = 99138 }, - { url = "https://files.pythonhosted.org/packages/b8/d7/bd7cb2d95ac6ac6e8d05bfa96cdce69619f1ef2808e072919044c2d47a8c/nvidia_nvtx_cu12-12.1.105-py3-none-win_amd64.whl", hash = "sha256:65f4d98982b31b60026e0e6de73fbdfc09d08a96f4656dd3665ca616a11e1e82", size = 66307 }, ] [[package]] @@ -3903,19 +3900,6 @@ docs = [ ] gpu = [ { name = "jax", extra = ["cuda12"] }, - { name = "nvidia-cublas-cu12" }, - { name = "nvidia-cuda-cupti-cu12" }, - { name = "nvidia-cuda-nvcc-cu12" }, - { name = "nvidia-cuda-nvrtc-cu12" }, - { name = "nvidia-cuda-runtime-cu12" }, - { name = "nvidia-cudnn-cu12" }, - { name = "nvidia-cufft-cu12" }, - { name = "nvidia-curand-cu12" }, - { name = "nvidia-cusolver-cu12" }, - { name = "nvidia-cusparse-cu12" }, - { name = "nvidia-nccl-cu12" }, - { name = "nvidia-nvjitlink-cu12" }, - { name = "nvidia-nvtx-cu12" }, ] [package.dev-dependencies] @@ -3964,19 +3948,6 @@ requires-dist = [ { name = "mkdocs-section-index", marker = "extra == 'docs'", specifier = ">=0.3.9" }, { name = "mkdocs-video", marker = "extra == 'docs'", specifier = ">=1.5.0" }, { name = "mkdocstrings", extras = ["python"], specifier = ">=0.26.2" }, - { name = "nvidia-cublas-cu12", marker = "extra == 'gpu'", specifier = "==12.1.3.1" }, - { name = "nvidia-cuda-cupti-cu12", marker = "extra == 'gpu'", specifier = "==12.1.105" }, - { name = "nvidia-cuda-nvcc-cu12", marker = "extra == 'gpu'", specifier = "==12.6.68" }, - { name = "nvidia-cuda-nvrtc-cu12", marker = "extra == 'gpu'", specifier = "==12.1.105" }, - { name = "nvidia-cuda-runtime-cu12", marker = "extra == 'gpu'", specifier = "==12.1.105" }, - { name = "nvidia-cudnn-cu12", marker = "extra == 'gpu'", specifier = "==9.1.0.70" }, - { name = "nvidia-cufft-cu12", marker = "extra == 'gpu'", specifier = "==11.0.2.54" }, - { name = "nvidia-curand-cu12", marker = "extra == 'gpu'", specifier = "==10.3.2.106" }, - { name = "nvidia-cusolver-cu12", marker = "extra == 'gpu'", specifier = "==11.4.5.107" }, - { name = "nvidia-cusparse-cu12", marker = "extra == 'gpu'", specifier = "==12.1.0.106" }, - { name = "nvidia-nccl-cu12", marker = "extra == 'gpu'", specifier = "==2.20.5" }, - { name = "nvidia-nvjitlink-cu12", marker = "extra == 'gpu'", specifier = "==12.6.68" }, - { name = "nvidia-nvtx-cu12", marker = "extra == 'gpu'", specifier = "==12.1.105" }, { name = "pydantic", specifier = ">=2.8.2" }, { name = "rejax", specifier = ">=0.1.0" }, { name = "remote-slurm-executor", git = "https://github.com/lebrice/remote-slurm-executor?branch=master" },