@@ -60,35 +60,27 @@ jobs:
60
60
- { os: "ubuntu-22.04", pkg-name: "lightning", python-version: "3.12.7", pytorch-version: "2.5.1" }
61
61
- { os: "windows-2022", pkg-name: "lightning", python-version: "3.12.7", pytorch-version: "2.5.1" }
62
62
# only run PyTorch latest with Python latest, use PyTorch scope to limit dependency issues
63
- - { os: "macOS-14", pkg-name: "pytorch", python-version: "3.12.7", pytorch-version: "2.5.1 " }
64
- - { os: "ubuntu-22.04", pkg-name: "pytorch", python-version: "3.12.7", pytorch-version: "2.5.1 " }
65
- - { os: "windows-2022", pkg-name: "pytorch", python-version: "3.12.7", pytorch-version: "2.5.1 " }
63
+ - { os: "macOS-14", pkg-name: "pytorch", python-version: "3.12.7", pytorch-version: "2.6 " }
64
+ - { os: "ubuntu-22.04", pkg-name: "pytorch", python-version: "3.12.7", pytorch-version: "2.6 " }
65
+ - { os: "windows-2022", pkg-name: "pytorch", python-version: "3.12.7", pytorch-version: "2.6 " }
66
66
# "oldest" versions tests, only on minimum Python
67
- - { os: "macOS-14", pkg-name: "lightning", python-version: "3.9", pytorch-version: "2.1", requires: "oldest" }
68
- - {
69
- os : " ubuntu-20.04" ,
70
- pkg-name : " lightning" ,
71
- python-version : " 3.9" ,
72
- pytorch-version : " 2.1" ,
73
- requires : " oldest" ,
74
- }
75
- - {
76
- os : " windows-2022" ,
77
- pkg-name : " lightning" ,
78
- python-version : " 3.9" ,
79
- pytorch-version : " 2.1" ,
80
- requires : " oldest" ,
81
- }
67
+ - { os: "macOS-14", pkg-name: "pytorch", pytorch-version: "2.1", requires: "oldest" }
68
+ - { os: "ubuntu-20.04", pkg-name: "pytorch", pytorch-version: "2.1", requires: "oldest" }
69
+ - { os: "windows-2022", pkg-name: "pytorch", pytorch-version: "2.1", requires: "oldest" }
82
70
# "pytorch" installs the standalone package
83
- - { os: "macOS-14", pkg-name: "pytorch", python-version: "3.9", pytorch-version: "2.1" }
84
- - { os: "ubuntu-20.04", pkg-name: "pytorch", python-version: "3.9", pytorch-version: "2.1" }
85
- - { os: "windows-2022", pkg-name: "pytorch", python-version: "3.9", pytorch-version: "2.1" }
71
+ - { os: "macOS-14", pkg-name: "pytorch", python-version: "3.10", pytorch-version: "2.5" }
72
+ - { os: "ubuntu-20.04", pkg-name: "pytorch", python-version: "3.10", pytorch-version: "2.5" }
73
+ - { os: "windows-2022", pkg-name: "pytorch", python-version: "3.10", pytorch-version: "2.5" }
74
+ # adding recently cut Torch 2.7 - FUTURE
75
+ # - { os: "macOS-14", pkg-name: "pytorch", python-version: "3.12", pytorch-version: "2.7" }
76
+ # - { os: "ubuntu-22.04", pkg-name: "pytorch", python-version: "3.12", pytorch-version: "2.7" }
77
+ # - { os: "windows-2022", pkg-name: "pytorch", python-version: "3.12", pytorch-version: "2.7" }
86
78
timeout-minutes : 50
87
79
env :
88
80
PACKAGE_NAME : ${{ matrix.pkg-name }}
89
- TORCH_URL : " https://download.pytorch.org/whl/cpu/torch_stable.html "
90
- TORCH_URL_STABLE : " https://download.pytorch.org/whl/cpu/torch_stable.html "
91
- TORCH_URL_TEST : " https://download.pytorch.org/whl/test/cpu/torch "
81
+ TORCH_URL : " https://download.pytorch.org/whl/cpu/"
82
+ TORCH_URL_STABLE : " https://download.pytorch.org/whl/cpu/"
83
+ TORCH_URL_TEST : " https://download.pytorch.org/whl/test/cpu/"
92
84
FREEZE_REQUIREMENTS : ${{ ! (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }}
93
85
PYPI_CACHE_DIR : " _pip-wheels"
94
86
# TODO: Remove this - Enable running MPS tests on this platform
99
91
- name : Set up Python ${{ matrix.python-version }}
100
92
uses : actions/setup-python@v5
101
93
with :
102
- python-version : ${{ matrix.python-version }}
94
+ python-version : ${{ matrix.python-version || '3.9' }}
103
95
104
96
- name : basic setup
105
97
run : pip install -q -r .actions/requirements.txt
@@ -132,8 +124,8 @@ jobs:
132
124
133
125
- name : Env. variables
134
126
run : |
135
- # Switch PyTorch URL
136
- python -c "print('TORCH_URL=' + str('${{env.TORCH_URL_TEST}}' if '${{ matrix.pytorch-version }}' == '2.5 ' else '${{env.TORCH_URL_STABLE}}'))" >> $GITHUB_ENV
127
+ # Switch PyTorch URL between stable and test/future
128
+ python -c "print('TORCH_URL=' + str('${{env.TORCH_URL_TEST}}' if '${{ matrix.pytorch-version }}' == '2.7 ' else '${{env.TORCH_URL_STABLE}}'))" >> $GITHUB_ENV
137
129
# Switch coverage scope
138
130
python -c "print('COVERAGE_SCOPE=' + str('lightning' if '${{matrix.pkg-name}}' == 'lightning' else 'pytorch_lightning'))" >> $GITHUB_ENV
139
131
# if you install mono-package set dependency only for this subpackage
@@ -146,7 +138,7 @@ jobs:
146
138
run : |
147
139
pip install ".[${EXTRA_PREFIX}extra,${EXTRA_PREFIX}test,${EXTRA_PREFIX}strategies]" -U --prefer-binary \
148
140
-r requirements/_integrations/accelerators.txt \
149
- --find-links ="${TORCH_URL}" --find-links="${PYPI_CACHE_DIR}"
141
+ --extra-index-url ="${TORCH_URL}" --find-links="${PYPI_CACHE_DIR}"
150
142
pip list
151
143
- name : Drop LAI from extensions
152
144
if : ${{ matrix.pkg-name != 'lightning' }}
0 commit comments