CI: use native oldest for package (#15094)
* use native oldest for package * print * adjust
This commit is contained in:
parent
776432fd7e
commit
1883295eac
|
@ -87,7 +87,7 @@ jobs:
|
||||||
|
|
||||||
- run: mkdir -p pypi
|
- run: mkdir -p pypi
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
if: ${{ matrix.pkg != '' }}
|
if: matrix.pkg != ''
|
||||||
with:
|
with:
|
||||||
name: ci-packages-${{ github.sha }}
|
name: ci-packages-${{ github.sha }}
|
||||||
path: pypi
|
path: pypi
|
||||||
|
|
|
@ -30,19 +30,19 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
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.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.9"} # ex-conda
|
||||||
- {os: "ubuntu-20.04", python-version: "3.8", pytorch-version: "1.10"} # 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.11"} # ex-conda
|
||||||
- {os: "ubuntu-20.04", python-version: "3.9", pytorch-version: "1.12"} # 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: "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.7", pytorch-version: "1.12"}
|
||||||
- {os: "macos-11", python-version: "3.8", pytorch-version: "1.10"}
|
- {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.9", pytorch-version: "1.11"}
|
||||||
- {os: "macos-11", python-version: "3.10", pytorch-version: "1.12"}
|
- {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.7", pytorch-version: "1.12"}
|
||||||
- {os: "windows-2022", python-version: "3.8", pytorch-version: "1.10"}
|
- {os: "windows-2022", python-version: "3.8", pytorch-version: "1.10"}
|
||||||
- {os: "windows-2022", python-version: "3.9", pytorch-version: "1.11"}
|
- {os: "windows-2022", python-version: "3.9", pytorch-version: "1.11"}
|
||||||
|
@ -95,14 +95,17 @@ jobs:
|
||||||
- name: Pull legacy checkpoints
|
- name: Pull legacy checkpoints
|
||||||
run: bash .actions/pull_legacy_checkpoints.sh
|
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
|
- name: Install dependencies
|
||||||
env:
|
env:
|
||||||
PACKAGE_NAME: pytorch
|
PACKAGE_NAME: pytorch
|
||||||
FREEZE_REQUIREMENTS: 1
|
FREEZE_REQUIREMENTS: 1
|
||||||
run: |
|
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
|
# install PL and optional dependencies for testing
|
||||||
pre_option=$(python -c "print('--pre' if '${{matrix.release}}' == 'pre' else '')" 2>&1)
|
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)
|
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)
|
||||||
|
|
|
@ -7,7 +7,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
clear-cache:
|
clear-cache:
|
||||||
if: ${{ github.repository_owner == 'Lightning-AI' }}
|
if: github.repository_owner == 'Lightning-AI'
|
||||||
uses: Lightning-AI/utilities/.github/workflows/clear-cache.yml@main
|
uses: Lightning-AI/utilities/.github/workflows/clear-cache.yml@main
|
||||||
with:
|
with:
|
||||||
pattern: 'latest|docs'
|
pattern: 'latest|docs'
|
||||||
|
|
|
@ -81,6 +81,7 @@ if __name__ == "__main__":
|
||||||
requirements_path, torch_version = sys.argv[1:]
|
requirements_path, torch_version = sys.argv[1:]
|
||||||
else:
|
else:
|
||||||
requirements_path, torch_version = sys.argv[1], None
|
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:
|
with open(requirements_path) as fp:
|
||||||
requirements = fp.read()
|
requirements = fp.read()
|
||||||
|
|
Loading…
Reference in New Issue