From 4f9a4a9942192854d4d6cfefcb4bf038f3a2fc09 Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Wed, 12 Oct 2022 13:53:50 -0400 Subject: [PATCH 01/18] [Nova][WIP] Add Linux CPU Unittests for Torchvision --- .github/workflows/test-linux-cpu.yml | 52 ++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/test-linux-cpu.yml diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml new file mode 100644 index 00000000000..390905c5903 --- /dev/null +++ b/.github/workflows/test-linux-cpu.yml @@ -0,0 +1,52 @@ +name: Unit-tests on Linux CPU +on: + pull_request: + push: + branches: + - nightly + - main + - release/* + workflow_dispatch: +env: + CHANNEL: "nightly" +jobs: + tests: + name: "Unit-tests on Linux CPU" + runs-on: ubuntu-latest + container: + image: pytorch/manylinux-builder:cpu + strategy: + matrix: + py_vers: [ "3.8"] + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Set Release CHANNEL (for release) + if: ${{ (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release')) || startsWith(github.ref, 'refs/heads/release') }} + run: | + echo "CHANNEL=test" >> "$GITHUB_ENV" + - name: Install TorchVision + shell: bash -l {0} + env: + ENV_NAME: conda-env-${{ github.run_id }} + PY_VERS: ${{ matrix.py_vers }} + run: | + . ~/miniconda3/etc/profile.d/conda.sh + # Needed for JPEG library detection as setup.py detects conda presence by running `shutil.which('conda')` + export PATH=~/miniconda3/bin:$PATH + set -ex + conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg scipy + conda run -p ${ENV_NAME} python3 -mpip install --pre torch --extra-index-url=https://download.pytorch.org/whl/${CHANNEL} + conda run -p ${ENV_NAME} python3 setup.py develop + conda run -p ${ENV_NAME} python3 -mpip install pytest pytest-mock av + - name: Run tests + shell: bash -l {0} + env: + ENV_NAME: conda-env-${{ github.run_id }} + PY_VERS: ${{ matrix.py_vers }} + run: | + . ~/miniconda3/etc/profile.d/conda.sh + set -ex + conda run -p ${ENV_NAME} --no-capture-output python3 -u -mpytest -v --tb=long --durations 20 + conda env remove -p ${ENV_NAME} From 038a1c31de01b2cf5b9e41c3f352da34842769b5 Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Wed, 12 Oct 2022 13:58:19 -0400 Subject: [PATCH 02/18] use conda-builder image since conda installation is needed --- .github/workflows/test-linux-cpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index 390905c5903..c12a04f45db 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -14,7 +14,7 @@ jobs: name: "Unit-tests on Linux CPU" runs-on: ubuntu-latest container: - image: pytorch/manylinux-builder:cpu + image: pytorch/conda-builder:cpu strategy: matrix: py_vers: [ "3.8"] From 87708000b1717cf062b650e5f4b03d645f539007 Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Wed, 12 Oct 2022 14:20:15 -0400 Subject: [PATCH 03/18] install torch dep with conda instead --- .github/workflows/test-linux-cpu.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index c12a04f45db..7b270b39636 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -31,13 +31,16 @@ jobs: env: ENV_NAME: conda-env-${{ github.run_id }} PY_VERS: ${{ matrix.py_vers }} + VERSION: cpu + CUDATOOLKIT: cpuonly run: | . ~/miniconda3/etc/profile.d/conda.sh # Needed for JPEG library detection as setup.py detects conda presence by running `shutil.which('conda')` export PATH=~/miniconda3/bin:$PATH set -ex conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg scipy - conda run -p ${ENV_NAME} python3 -mpip install --pre torch --extra-index-url=https://download.pytorch.org/whl/${CHANNEL} + # conda run -p ${ENV_NAME} python3 -mpip install --pre torch --extra-index-url=https://download.pytorch.org/whl/${CHANNEL}/cpu + conda run -p ${ENV_NAME} conda install -y -c "pytorch-${CHANNEL}" -c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] "${CUDATOOLKIT}" conda run -p ${ENV_NAME} python3 setup.py develop conda run -p ${ENV_NAME} python3 -mpip install pytest pytest-mock av - name: Run tests From f12310b83138a263241d7dea9248fc90f61f5aea Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Wed, 12 Oct 2022 15:03:11 -0400 Subject: [PATCH 04/18] use circleCI command to run tests --- .github/workflows/test-linux-cpu.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index 7b270b39636..8a7f21dfb9c 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -51,5 +51,7 @@ jobs: run: | . ~/miniconda3/etc/profile.d/conda.sh set -ex - conda run -p ${ENV_NAME} --no-capture-output python3 -u -mpytest -v --tb=long --durations 20 + # conda run -p ${ENV_NAME} --no-capture-output python3 -u -mpytest -v --tb=long --durations 20 + conda run -p ${ENV_NAME} python3 -m torch.utils.collect_env + conda run -p ${ENV_NAME} python3 -m pytest --junitxml=test-results/junit.xml -v --durations 20 conda env remove -p ${ENV_NAME} From 360069e67264107d74c2995ba41f96feb95df538 Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Wed, 12 Oct 2022 21:17:27 -0400 Subject: [PATCH 05/18] larger instance to avoid OOM issues --- .github/workflows/test-linux-cpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index 8a7f21dfb9c..e05298c4601 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -12,7 +12,7 @@ env: jobs: tests: name: "Unit-tests on Linux CPU" - runs-on: ubuntu-latest + runs-on: linux.2xlarge container: image: pytorch/conda-builder:cpu strategy: From e894142cb88cacc57b2ab06a00cdbb6feeaa00ab Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Thu, 13 Oct 2022 11:46:18 -0400 Subject: [PATCH 06/18] proper syntax for self-hosted runners --- .github/workflows/test-linux-cpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index e05298c4601..e5a3d10b914 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -12,7 +12,7 @@ env: jobs: tests: name: "Unit-tests on Linux CPU" - runs-on: linux.2xlarge + runs-on: [self-hosted, linux.2xlarge] container: image: pytorch/conda-builder:cpu strategy: From 8c51fd5e202e580a15e533912e0b13af22e52c39 Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Thu, 13 Oct 2022 14:13:48 -0400 Subject: [PATCH 07/18] 4xlarge instance --- .github/workflows/test-linux-cpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index e5a3d10b914..56751f26315 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -12,7 +12,7 @@ env: jobs: tests: name: "Unit-tests on Linux CPU" - runs-on: [self-hosted, linux.2xlarge] + runs-on: [self-hosted, linux.4xlarge] container: image: pytorch/conda-builder:cpu strategy: From 20d30e29f50596f260f088d4a1fdf6b08daf1227 Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Thu, 13 Oct 2022 15:17:46 -0400 Subject: [PATCH 08/18] 8xlarge --- .github/workflows/test-linux-cpu.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index 56751f26315..55a27a47cb6 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -12,12 +12,12 @@ env: jobs: tests: name: "Unit-tests on Linux CPU" - runs-on: [self-hosted, linux.4xlarge] + runs-on: [self-hosted, linux.8xlarge] container: image: pytorch/conda-builder:cpu strategy: matrix: - py_vers: [ "3.8"] + py_vers: ["3.8"] steps: - name: Checkout repository From 02b1dd4ff30f9af2b5acff792359952547809725 Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Fri, 14 Oct 2022 11:46:58 -0400 Subject: [PATCH 09/18] 12xlarge --- .github/workflows/test-linux-cpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index 55a27a47cb6..2c874e2e937 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -12,7 +12,7 @@ env: jobs: tests: name: "Unit-tests on Linux CPU" - runs-on: [self-hosted, linux.8xlarge] + runs-on: [self-hosted, linux.12xlarge] container: image: pytorch/conda-builder:cpu strategy: From 7b0e1a57f0d605a0d8f56a5f7fe6ac4229226d0c Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Fri, 14 Oct 2022 12:25:38 -0400 Subject: [PATCH 10/18] use setup-miniconda job --- .github/workflows/test-linux-cpu.yml | 30 +++++++++++++++++----------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index 2c874e2e937..566c025bc57 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -14,7 +14,7 @@ jobs: name: "Unit-tests on Linux CPU" runs-on: [self-hosted, linux.12xlarge] container: - image: pytorch/conda-builder:cpu + image: pytorch/manylinux-builder:cpu strategy: matrix: py_vers: ["3.8"] @@ -26,6 +26,12 @@ jobs: if: ${{ (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release')) || startsWith(github.ref, 'refs/heads/release') }} run: | echo "CHANNEL=test" >> "$GITHUB_ENV" + - name: Setup miniconda + uses: pytorch/test-infra/.github/actions/setup-miniconda@main + env: + PY_VERS: ${{ matrix.py_vers }} + with: + python_version: ${PY_VERS} - name: Install TorchVision shell: bash -l {0} env: @@ -34,15 +40,17 @@ jobs: VERSION: cpu CUDATOOLKIT: cpuonly run: | - . ~/miniconda3/etc/profile.d/conda.sh + # . ~/miniconda3/etc/profile.d/conda.sh # Needed for JPEG library detection as setup.py detects conda presence by running `shutil.which('conda')` - export PATH=~/miniconda3/bin:$PATH + # export PATH=~/miniconda3/bin:$PATH set -ex - conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg scipy - # conda run -p ${ENV_NAME} python3 -mpip install --pre torch --extra-index-url=https://download.pytorch.org/whl/${CHANNEL}/cpu - conda run -p ${ENV_NAME} conda install -y -c "pytorch-${CHANNEL}" -c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] "${CUDATOOLKIT}" - conda run -p ${ENV_NAME} python3 setup.py develop - conda run -p ${ENV_NAME} python3 -mpip install pytest pytest-mock av + # conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg scipy + # conda run -p ${ENV_NAME} conda install -y -c "pytorch-${CHANNEL}" -c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] "${CUDATOOLKIT}" + # conda run -p ${ENV_NAME} python3 setup.py develop + # conda run -p ${ENV_NAME} python3 -mpip install pytest pytest-mock av + ${CONDA_RUN} conda install -y -c "pytorch-${CHANNEL}" -c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] "${CUDATOOLKIT}" + ${CONDA_RUN} python3 setup.py develop + ${CONDA_RUN} python3 -mpip install pytest pytest-mock av - name: Run tests shell: bash -l {0} env: @@ -51,7 +59,5 @@ jobs: run: | . ~/miniconda3/etc/profile.d/conda.sh set -ex - # conda run -p ${ENV_NAME} --no-capture-output python3 -u -mpytest -v --tb=long --durations 20 - conda run -p ${ENV_NAME} python3 -m torch.utils.collect_env - conda run -p ${ENV_NAME} python3 -m pytest --junitxml=test-results/junit.xml -v --durations 20 - conda env remove -p ${ENV_NAME} + ${CONDA_RUN} python3 -m torch.utils.collect_env + ${CONDA_RUN} python3 -m pytest --junitxml=test-results/junit.xml -v --durations 20 From 86a8314a57daa6ccf8e8def58d22341d7bbe68ee Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Fri, 14 Oct 2022 13:44:21 -0400 Subject: [PATCH 11/18] add back PATH change to help setup py detect conda --- .github/workflows/test-linux-cpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index 566c025bc57..01197485089 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -42,7 +42,7 @@ jobs: run: | # . ~/miniconda3/etc/profile.d/conda.sh # Needed for JPEG library detection as setup.py detects conda presence by running `shutil.which('conda')` - # export PATH=~/miniconda3/bin:$PATH + export PATH=~/miniconda3/bin:$PATH set -ex # conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg scipy # conda run -p ${ENV_NAME} conda install -y -c "pytorch-${CHANNEL}" -c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] "${CUDATOOLKIT}" From 5b36d4d04e85a2fe2ef9de6d55107b2de1cf5084 Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Fri, 14 Oct 2022 13:48:24 -0400 Subject: [PATCH 12/18] run conda shell script --- .github/workflows/test-linux-cpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index 01197485089..f9201f916f1 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -40,7 +40,7 @@ jobs: VERSION: cpu CUDATOOLKIT: cpuonly run: | - # . ~/miniconda3/etc/profile.d/conda.sh + . ~/miniconda3/etc/profile.d/conda.sh # Needed for JPEG library detection as setup.py detects conda presence by running `shutil.which('conda')` export PATH=~/miniconda3/bin:$PATH set -ex From 9a6115cf4a546862849be8eb93b756a3620b9967 Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Fri, 14 Oct 2022 14:16:47 -0400 Subject: [PATCH 13/18] install other deps up front --- .github/workflows/test-linux-cpu.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index f9201f916f1..6b37142c8b8 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -48,6 +48,7 @@ jobs: # conda run -p ${ENV_NAME} conda install -y -c "pytorch-${CHANNEL}" -c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] "${CUDATOOLKIT}" # conda run -p ${ENV_NAME} python3 setup.py develop # conda run -p ${ENV_NAME} python3 -mpip install pytest pytest-mock av + ${CONDA_RUN} conda install -y numpy libpng jpeg scipy ${CONDA_RUN} conda install -y -c "pytorch-${CHANNEL}" -c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] "${CUDATOOLKIT}" ${CONDA_RUN} python3 setup.py develop ${CONDA_RUN} python3 -mpip install pytest pytest-mock av From 2336c08763dee21534d4b1fa9f4861d5b444e936 Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Fri, 14 Oct 2022 14:56:19 -0400 Subject: [PATCH 14/18] git config and undo path change --- .github/workflows/test-linux-cpu.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index 6b37142c8b8..191d894b168 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -40,9 +40,9 @@ jobs: VERSION: cpu CUDATOOLKIT: cpuonly run: | - . ~/miniconda3/etc/profile.d/conda.sh + # . ~/miniconda3/etc/profile.d/conda.sh # Needed for JPEG library detection as setup.py detects conda presence by running `shutil.which('conda')` - export PATH=~/miniconda3/bin:$PATH + # export PATH=~/miniconda3/bin:$PATH set -ex # conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg scipy # conda run -p ${ENV_NAME} conda install -y -c "pytorch-${CHANNEL}" -c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] "${CUDATOOLKIT}" @@ -50,6 +50,7 @@ jobs: # conda run -p ${ENV_NAME} python3 -mpip install pytest pytest-mock av ${CONDA_RUN} conda install -y numpy libpng jpeg scipy ${CONDA_RUN} conda install -y -c "pytorch-${CHANNEL}" -c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] "${CUDATOOLKIT}" + git config --global --add safe.directory /__w/vision/vision ${CONDA_RUN} python3 setup.py develop ${CONDA_RUN} python3 -mpip install pytest pytest-mock av - name: Run tests From f3061eb1d2b43e1e7f52d5801fdaba41734d77e0 Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Fri, 14 Oct 2022 16:26:56 -0400 Subject: [PATCH 15/18] revert to local conda install --- .github/workflows/test-linux-cpu.yml | 31 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index 191d894b168..4b3d44e8b28 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -26,33 +26,32 @@ jobs: if: ${{ (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release')) || startsWith(github.ref, 'refs/heads/release') }} run: | echo "CHANNEL=test" >> "$GITHUB_ENV" - - name: Setup miniconda - uses: pytorch/test-infra/.github/actions/setup-miniconda@main + - name: Setup Conda + shell: bash -l {0} env: + ENV_NAME: conda-env-${{ github.run_id }} PY_VERS: ${{ matrix.py_vers }} - with: - python_version: ${PY_VERS} + run: | + git config --global --add safe.directory /__w/vision/vision + . ~/miniconda3/etc/profile.d/conda.sh + conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg scipy + echo "CONDA_RUN=conda run -p ${ENV_NAME}" >> "$GITHUB_ENV" - name: Install TorchVision shell: bash -l {0} env: - ENV_NAME: conda-env-${{ github.run_id }} - PY_VERS: ${{ matrix.py_vers }} VERSION: cpu CUDATOOLKIT: cpuonly run: | - # . ~/miniconda3/etc/profile.d/conda.sh # Needed for JPEG library detection as setup.py detects conda presence by running `shutil.which('conda')` - # export PATH=~/miniconda3/bin:$PATH + export PATH=~/miniconda3/bin:$PATH set -ex - # conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg scipy - # conda run -p ${ENV_NAME} conda install -y -c "pytorch-${CHANNEL}" -c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] "${CUDATOOLKIT}" - # conda run -p ${ENV_NAME} python3 setup.py develop - # conda run -p ${ENV_NAME} python3 -mpip install pytest pytest-mock av - ${CONDA_RUN} conda install -y numpy libpng jpeg scipy - ${CONDA_RUN} conda install -y -c "pytorch-${CHANNEL}" -c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] "${CUDATOOLKIT}" - git config --global --add safe.directory /__w/vision/vision + ${CONDA_RUN} conda install \ + --yes \ + -c "pytorch-${CHANNEL}" \ + -c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] \ + "${CUDATOOLKIT}" ${CONDA_RUN} python3 setup.py develop - ${CONDA_RUN} python3 -mpip install pytest pytest-mock av + ${CONDA_RUN} python3 -m pip install pytest pytest-mock av - name: Run tests shell: bash -l {0} env: From 32624418140cc06d7d9b7df5e7a6565f9bddae89 Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Fri, 14 Oct 2022 16:30:50 -0400 Subject: [PATCH 16/18] conda-builder image --- .github/workflows/test-linux-cpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index 4b3d44e8b28..ab55bd47784 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -14,7 +14,7 @@ jobs: name: "Unit-tests on Linux CPU" runs-on: [self-hosted, linux.12xlarge] container: - image: pytorch/manylinux-builder:cpu + image: pytorch/conda-builder:cpu strategy: matrix: py_vers: ["3.8"] From a37225b13899e8a20fe725c505a3694c2f1d06ff Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Fri, 14 Oct 2022 17:07:57 -0400 Subject: [PATCH 17/18] support for whole python version matrix --- .github/workflows/test-linux-cpu.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index ab55bd47784..701be7faeb5 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -1,4 +1,5 @@ name: Unit-tests on Linux CPU + on: pull_request: push: @@ -7,8 +8,10 @@ on: - main - release/* workflow_dispatch: + env: CHANNEL: "nightly" + jobs: tests: name: "Unit-tests on Linux CPU" @@ -17,7 +20,7 @@ jobs: image: pytorch/conda-builder:cpu strategy: matrix: - py_vers: ["3.8"] + py_vers: ["3.7", "3.8", "3.9", "3.10"] steps: - name: Checkout repository @@ -42,7 +45,8 @@ jobs: VERSION: cpu CUDATOOLKIT: cpuonly run: | - # Needed for JPEG library detection as setup.py detects conda presence by running `shutil.which('conda')` + # Needed for JPEG library detection as setup.py detects conda presence + # by running `shutil.which('conda')` export PATH=~/miniconda3/bin:$PATH set -ex ${CONDA_RUN} conda install \ From 2167e0b3040546997114b9fdc0a98fb7f3b563c5 Mon Sep 17 00:00:00 2001 From: Omkar Salpekar Date: Fri, 14 Oct 2022 17:33:02 -0400 Subject: [PATCH 18/18] clean up the conda env once we are done with the job --- .github/workflows/test-linux-cpu.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-linux-cpu.yml b/.github/workflows/test-linux-cpu.yml index 701be7faeb5..81ace6351b3 100644 --- a/.github/workflows/test-linux-cpu.yml +++ b/.github/workflows/test-linux-cpu.yml @@ -66,3 +66,4 @@ jobs: set -ex ${CONDA_RUN} python3 -m torch.utils.collect_env ${CONDA_RUN} python3 -m pytest --junitxml=test-results/junit.xml -v --durations 20 + conda env remove -p ${ENV_NAME}