diff --git a/.github/workflows/ci-pkg-install.yml b/.github/workflows/ci-pkg-install.yml index 9da9792101..c311d44ebe 100644 --- a/.github/workflows/ci-pkg-install.yml +++ b/.github/workflows/ci-pkg-install.yml @@ -87,7 +87,7 @@ jobs: - run: mkdir -p pypi - uses: actions/download-artifact@v3 - if: ${{ matrix.pkg != '' }} + if: matrix.pkg != '' with: name: ci-packages-${{ github.sha }} path: pypi diff --git a/.github/workflows/ci-pytorch-test-full.yml b/.github/workflows/ci-pytorch-test-full.yml index 2f040f15c9..7f6e3530b3 100644 --- a/.github/workflows/ci-pytorch-test-full.yml +++ b/.github/workflows/ci-pytorch-test-full.yml @@ -30,19 +30,19 @@ jobs: fail-fast: false matrix: include: - - {os: "ubuntu-20.04", python-version: "3.7", pytorch-version: "1.9", requires: "oldest"} + - {os: "ubuntu-20.04", python-version: "3.7", pytorch-version: "1.9", requires: "oldest"} # PT is set for sanity check - {os: "ubuntu-20.04", python-version: "3.7", pytorch-version: "1.12"} - {os: "ubuntu-20.04", python-version: "3.8", pytorch-version: "1.9"} # ex-conda - {os: "ubuntu-20.04", python-version: "3.8", pytorch-version: "1.10"} # ex-conda - {os: "ubuntu-20.04", python-version: "3.9", pytorch-version: "1.11"} # ex-conda - {os: "ubuntu-20.04", python-version: "3.9", pytorch-version: "1.12"} # ex-conda - {os: "ubuntu-20.04", python-version: "3.10", pytorch-version: "1.12"} - - {os: "macos-11", python-version: "3.7", pytorch-version: "1.9", requires: "oldest"} + - {os: "macos-11", python-version: "3.7", pytorch-version: "1.9", requires: "oldest"} # PT is set for sanity check - {os: "macos-11", python-version: "3.7", pytorch-version: "1.12"} - {os: "macos-11", python-version: "3.8", pytorch-version: "1.10"} - {os: "macos-11", python-version: "3.9", pytorch-version: "1.11"} - {os: "macos-11", python-version: "3.10", pytorch-version: "1.12"} - - {os: "windows-2022", python-version: "3.7", pytorch-version: "1.9", requires: "oldest"} + - {os: "windows-2022", python-version: "3.7", pytorch-version: "1.9", requires: "oldest"} # PT is set for sanity check - {os: "windows-2022", python-version: "3.7", pytorch-version: "1.12"} - {os: "windows-2022", python-version: "3.8", pytorch-version: "1.10"} - {os: "windows-2022", python-version: "3.9", pytorch-version: "1.11"} @@ -95,14 +95,17 @@ jobs: - name: Pull legacy checkpoints run: bash .actions/pull_legacy_checkpoints.sh + - name: Adjust PyTorch versions in requirements files + if: matrix.requires != 'oldest' + run: | + python ./requirements/pytorch/adjust-versions.py requirements/pytorch/base.txt ${{ matrix.pytorch-version }} + python ./requirements/pytorch/adjust-versions.py requirements/pytorch/examples.txt ${{ matrix.pytorch-version }} + - name: Install dependencies env: PACKAGE_NAME: pytorch FREEZE_REQUIREMENTS: 1 run: | - # adjust PyTorch versions in requirements files - python ./requirements/pytorch/adjust-versions.py requirements/pytorch/base.txt ${{ matrix.pytorch-version }} - python ./requirements/pytorch/adjust-versions.py requirements/pytorch/examples.txt ${{ matrix.pytorch-version }} # install PL and optional dependencies for testing pre_option=$(python -c "print('--pre' if '${{matrix.release}}' == 'pre' else '')" 2>&1) url=https://download.pytorch.org/whl/$(python -c "print('test/cpu/torch_test.html' if '${{matrix.release}}' == 'pre' else 'cpu/torch_stable.html')" 2>&1) diff --git a/.github/workflows/schedule-clear-cache.yml b/.github/workflows/schedule-clear-cache.yml index 7bf24f647d..de863b037c 100644 --- a/.github/workflows/schedule-clear-cache.yml +++ b/.github/workflows/schedule-clear-cache.yml @@ -7,7 +7,7 @@ on: jobs: clear-cache: - if: ${{ github.repository_owner == 'Lightning-AI' }} + if: github.repository_owner == 'Lightning-AI' uses: Lightning-AI/utilities/.github/workflows/clear-cache.yml@main with: pattern: 'latest|docs' diff --git a/requirements/pytorch/adjust-versions.py b/requirements/pytorch/adjust-versions.py index 70c94b358f..19d47581fb 100644 --- a/requirements/pytorch/adjust-versions.py +++ b/requirements/pytorch/adjust-versions.py @@ -81,6 +81,7 @@ if __name__ == "__main__": requirements_path, torch_version = sys.argv[1:] else: requirements_path, torch_version = sys.argv[1], None + print(f"requirements_path='{requirements_path}' with torch_version='{torch_version}'") with open(requirements_path) as fp: requirements = fp.read()