diff --git a/.github/workflows/mps-tests.yml b/.github/workflows/mps-tests.yml index db278b8cebb4..1932a238df57 100644 --- a/.github/workflows/mps-tests.yml +++ b/.github/workflows/mps-tests.yml @@ -42,64 +42,19 @@ jobs: timeout-minutes: 60 steps: - - name: Clean workspace - run: | - echo "::group::Cleanup debug output" - sudo rm -rfv "${GITHUB_WORKSPACE}" - mkdir -p "${GITHUB_WORKSPACE}" - echo "::endgroup::" - - - name: Checkout repository (pytorch/test-infra) - uses: actions/checkout@v3 - with: - # Support the use case where we need to checkout someone's fork - repository: pytorch/test-infra - path: test-infra + - name: Checkout repository + uses: actions/checkout@v4 - - name: Checkout repository (${{ github.repository }}) - uses: actions/checkout@v3 - with: - # Support the use case where we need to checkout someone's fork - repository: ${{ github.repository }} - ref: ${{ github.ref }} - path: ${{ github.repository }} - fetch-depth: 1 - - - name: Setup miniconda - uses: ./test-infra/.github/actions/setup-miniconda + - name: Install uv and set the python version + uses: astral-sh/setup-uv@v5 with: python-version: ${{ matrix.python-version }} - - name: Install PyTorch - if: ${{ matrix.pytorch-channel == 'pytorch' }} - shell: bash -l {0} - run: | - conda shell.bash hook - conda activate $CONDA_ENV - pip install -U torch torchvision - - - name: Install PyTorch (nightly) - if: ${{ matrix.pytorch-channel == 'pytorch-nightly' }} - shell: bash -l {0} - run: | - conda shell.bash hook - conda activate $CONDA_ENV - pip install --pre -U torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu - - name: Install dependencies - shell: bash -l {0} - working-directory: ${{ github.repository }} run: | - conda activate $CONDA_ENV - # TODO: We add set -xe to explicitly fail the CI if one of the commands is failing. - # Somehow the step is passing even if a subcommand failed - set -xe - pip install -r requirements-dev.txt - echo "1 returned code: $?" - pip install -e . - echo "2 returned code: $?" + uv pip install -r requirements-dev.txt + uv pip install -e . pip list - echo "3 returned code: $?" # Download MNIST: https://github.com/pytorch/ignite/issues/1737 # to "/tmp" for unit tests @@ -114,22 +69,14 @@ jobs: cp -R /tmp/MNIST . - name: Run Tests - shell: bash -l {0} - working-directory: ${{ github.repository }} - run: | - conda activate $CONDA_ENV - SKIP_DISTRIB_TESTS=${{ matrix.skip-distrib-tests }} bash tests/run_cpu_tests.sh + run: SKIP_DISTRIB_TESTS=${{ matrix.skip-distrib-tests }} bash tests/run_cpu_tests.sh - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 with: - file: ${{ github.repository }}/coverage.xml + file: coverage.xml flags: mps fail_ci_if_error: false - name: Run MNIST Examples - shell: bash -l {0} - working-directory: ${{ github.repository }} - run: | - conda activate $CONDA_ENV - python examples/mnist/mnist.py --epochs=1 + run: python examples/mnist/mnist.py --epochs=1