Skip to content

Commit 0336574

Browse files
committed
Upgrade CI to PyTorch 1.13 (#15403)
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: Akihiro Nitta <nitta@akihironitta.com> Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com> (cherry picked from commit 57ac548)
1 parent 031b044 commit 0336574

File tree

11 files changed

+74
-89
lines changed

11 files changed

+74
-89
lines changed

.github/checkgroup.yml

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
custom_service_name: "Lightning CI required checker"
2-
# For security reasons, configuration is only loaded from the repository's default branch,
3-
# changes made in pull requests from different branches or forks are ignored. This means that changes to this file
4-
# will only be used after they are merged.
52
subprojects:
63

74
# SECTION: pytorch_lightning
@@ -18,29 +15,25 @@ subprojects:
1815
- "setup.cfg" # includes pytest config
1916
- ".actions/**"
2017
checks:
21-
# Note: updates here should be applied to the lightning_lite group
22-
- "pl-cpu (macOS-11, pytorch, 3.8, 1.10)"
23-
- "pl-cpu (macOS-11, pytorch, 3.9, 1.11)"
24-
- "pl-cpu (macOS-11, pytorch, 3.10, 1.12)"
25-
- "pl-cpu (macOS-11, pytorch, 3.7, 1.9, oldest)"
26-
- "pl-cpu (macOS-11, pytorch, 3.10, 1.13, pre)"
18+
- "pl-cpu (macOS-11, pytorch, 3.8, 1.11)"
19+
- "pl-cpu (macOS-11, pytorch, 3.9, 1.12)"
20+
- "pl-cpu (macOS-11, pytorch, 3.10, 1.13)"
21+
- "pl-cpu (macOS-11, pytorch, 3.8, 1.9, oldest)"
2722
- "pl-cpu (ubuntu-20.04, pytorch, 3.8, 1.10)"
2823
- "pl-cpu (ubuntu-20.04, pytorch, 3.9, 1.11)"
29-
- "pl-cpu (ubuntu-20.04, pytorch, 3.10, 1.11)"
3024
- "pl-cpu (ubuntu-20.04, pytorch, 3.10, 1.12)"
25+
- "pl-cpu (ubuntu-20.04, pytorch, 3.10, 1.13)"
3126
- "pl-cpu (ubuntu-20.04, pytorch, 3.7, 1.9, oldest)"
32-
- "pl-cpu (ubuntu-20.04, pytorch, 3.9, 1.13, pre)"
3327
- "pl-cpu (windows-2022, pytorch, 3.9, 1.11)"
34-
- "pl-cpu (windows-2022, pytorch, 3.10, 1.11)"
3528
- "pl-cpu (windows-2022, pytorch, 3.10, 1.12)"
29+
- "pl-cpu (windows-2022, pytorch, 3.10, 1.13)"
3630
- "pl-cpu (windows-2022, pytorch, 3.7, 1.9, oldest)"
37-
- "pl-cpu (windows-2022, pytorch, 3.8, 1.13, pre)"
38-
- "pl-cpu (macOS-11, lightning, 3.10, 1.12)"
39-
- "pl-cpu (ubuntu-20.04, lightning, 3.10, 1.12)"
40-
- "pl-cpu (windows-2022, lightning, 3.10, 1.12)"
4131
- "pl-cpu (slow, macOS-11, pytorch, 3.7, 1.11)"
4232
- "pl-cpu (slow, ubuntu-20.04, pytorch, 3.7, 1.11)"
4333
- "pl-cpu (slow, windows-2022, pytorch, 3.7, 1.11)"
34+
- "pl-cpu (macOS-11, lightning, 3.8, 1.13)"
35+
- "pl-cpu (ubuntu-20.04, lightning, 3.8, 1.13)"
36+
- "pl-cpu (windows-2022, lightning, 3.8, 1.13)"
4437

4538
- id: "pytorch_lightning: Azure GPU"
4639
paths:
@@ -148,7 +141,7 @@ subprojects:
148141
- "build-pl (3.9, 1.10, 11.3.1)"
149142
- "build-pl (3.9, 1.11, 11.3.1)"
150143
- "build-pl (3.9, 1.12, 11.6.1)"
151-
# TODO: add 1.13
144+
- "build-pl (3.9, 1.13, 11.6.1)"
152145
- "build-xla (3.7, 1.12)"
153146

154147
# SECTION: lightning_lite
@@ -162,24 +155,22 @@ subprojects:
162155
- ".github/workflows/ci-lite-tests.yml"
163156
- ".actions/**"
164157
checks:
165-
- "lite-cpu (macOS-11, lite, 3.9, 1.11)"
166-
- "lite-cpu (macOS-11, lite, 3.8, 1.10)"
167-
- "lite-cpu (macOS-11, lite, 3.10, 1.12)"
168-
- "lite-cpu (macOS-11, lite, 3.10, 1.13, pre)"
158+
- "lite-cpu (macOS-11, lite, 3.8, 1.11)"
159+
- "lite-cpu (macOS-11, lite, 3.9, 1.12)"
160+
- "lite-cpu (macOS-11, lite, 3.10, 1.13)"
169161
- "lite-cpu (macOS-11, lite, 3.7, 1.9, oldest)"
170-
- "lite-cpu (ubuntu-20.04, lite, 3.8, 1.11)"
162+
- "lite-cpu (ubuntu-20.04, lite, 3.8, 1.10)"
163+
- "lite-cpu (ubuntu-20.04, lite, 3.9, 1.11)"
171164
- "lite-cpu (ubuntu-20.04, lite, 3.10, 1.12)"
165+
- "lite-cpu (ubuntu-20.04, lite, 3.10, 1.13)"
172166
- "lite-cpu (ubuntu-20.04, lite, 3.7, 1.9, oldest)"
173-
- "lite-cpu (ubuntu-20.04, lite, 3.9, 1.13, pre)"
174-
- "lite-cpu (windows-2022, lite, 3.8, 1.9)"
175-
- "lite-cpu (windows-2022, lite, 3.9, 1.10)"
176-
- "lite-cpu (windows-2022, lite, 3.10, 1.11)"
167+
- "lite-cpu (windows-2022, lite, 3.9, 1.11)"
177168
- "lite-cpu (windows-2022, lite, 3.10, 1.12)"
169+
- "lite-cpu (windows-2022, lite, 3.10, 1.13)"
178170
- "lite-cpu (windows-2022, lite, 3.7, 1.9, oldest)"
179-
- "lite-cpu (windows-2022, lite, 3.8, 1.13, pre)"
180-
- "lite-cpu (macOS-11, lightning, 3.8, 1.12)"
181-
- "lite-cpu (ubuntu-20.04, lightning, 3.8, 1.12)"
182-
- "lite-cpu (windows-2022, lightning, 3.8, 1.12)"
171+
- "lite-cpu (macOS-11, lightning, 3.8, 1.13)"
172+
- "lite-cpu (ubuntu-20.04, lightning, 3.8, 1.13)"
173+
- "lite-cpu (windows-2022, lightning, 3.8, 1.13)"
183174

184175
- id: "lightning_lite: Azure GPU"
185176
paths:

.github/workflows/ci-lite-tests.yml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,29 +35,26 @@ jobs:
3535
matrix:
3636
include:
3737
# assign python and pytorch version combinations to operating systems (arbitrarily)
38-
# note: there's no distribution of Torch==1.9 for Python>=3.9 or torch==1.10 for Python>=3.10
39-
- {os: "macOS-11", pkg-name: "lite", python-version: "3.9", pytorch-version: "1.11"}
40-
- {os: "macOS-11", pkg-name: "lite", python-version: "3.8", pytorch-version: "1.10"}
41-
- {os: "windows-2022", pkg-name: "lite", python-version: "3.10", pytorch-version: "1.11"}
42-
- {os: "windows-2022", pkg-name: "lite", python-version: "3.9", pytorch-version: "1.10"}
43-
- {os: "windows-2022", pkg-name: "lite", python-version: "3.8", pytorch-version: "1.9"}
44-
- {os: "ubuntu-20.04", pkg-name: "lite", python-version: "3.8", pytorch-version: "1.11"}
45-
# only run PyTorch latest with Python latest
46-
- {os: "macOS-11", pkg-name: "lite", python-version: "3.10", pytorch-version: "1.12"}
38+
# note: there's no distribution of torch==1.10 for Python>=3.10
39+
- {os: "macOS-11", pkg-name: "lite", python-version: "3.8", pytorch-version: "1.11"}
40+
- {os: "macOS-11", pkg-name: "lite", python-version: "3.9", pytorch-version: "1.12"}
41+
- {os: "ubuntu-20.04", pkg-name: "lite", python-version: "3.8", pytorch-version: "1.10"}
42+
- {os: "ubuntu-20.04", pkg-name: "lite", python-version: "3.9", pytorch-version: "1.11"}
4743
- {os: "ubuntu-20.04", pkg-name: "lite", python-version: "3.10", pytorch-version: "1.12"}
44+
- {os: "windows-2022", pkg-name: "lite", python-version: "3.9", pytorch-version: "1.11"}
4845
- {os: "windows-2022", pkg-name: "lite", python-version: "3.10", pytorch-version: "1.12"}
46+
# only run PyTorch latest with Python latest
47+
- {os: "macOS-11", pkg-name: "lite", python-version: "3.10", pytorch-version: "1.13"}
48+
- {os: "ubuntu-20.04", pkg-name: "lite", python-version: "3.10", pytorch-version: "1.13"}
49+
- {os: "windows-2022", pkg-name: "lite", python-version: "3.10", pytorch-version: "1.13"}
4950
# "oldest" versions tests, only on minimum Python
5051
- {os: "macOS-11", pkg-name: "lite", python-version: "3.7", pytorch-version: "1.9", requires: "oldest"}
5152
- {os: "ubuntu-20.04", pkg-name: "lite", python-version: "3.7", pytorch-version: "1.9", requires: "oldest"}
5253
- {os: "windows-2022", pkg-name: "lite", python-version: "3.7", pytorch-version: "1.9", requires: "oldest"}
53-
# release-candidate tests, mixed Python versions
54-
- {os: "macOS-11", pkg-name: "lite", python-version: "3.10", pytorch-version: "1.13", release: "pre"}
55-
- {os: "ubuntu-20.04", pkg-name: "lite", python-version: "3.9", pytorch-version: "1.13", release: "pre"}
56-
- {os: "windows-2022", pkg-name: "lite", python-version: "3.8", pytorch-version: "1.13", release: "pre"}
5754
# "lightning" installs the monolithic package
58-
- {os: "macOS-11", pkg-name: "lightning", python-version: "3.8", pytorch-version: "1.12"}
59-
- {os: "ubuntu-20.04", pkg-name: "lightning", python-version: "3.8", pytorch-version: "1.12"}
60-
- {os: "windows-2022", pkg-name: "lightning", python-version: "3.8", pytorch-version: "1.12"}
55+
- {os: "macOS-11", pkg-name: "lightning", python-version: "3.8", pytorch-version: "1.13"}
56+
- {os: "ubuntu-20.04", pkg-name: "lightning", python-version: "3.8", pytorch-version: "1.13"}
57+
- {os: "windows-2022", pkg-name: "lightning", python-version: "3.8", pytorch-version: "1.13"}
6158

6259
timeout-minutes: 15
6360

.github/workflows/ci-pytorch-tests.yml

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,39 +39,32 @@ jobs:
3939
matrix:
4040
include:
4141
# assign python and pytorch version combinations to operating systems (arbitrarily)
42-
# note: there's no distribution of Torch==1.9 for Python>=3.9 or torch==1.10 for Python>=3.10
43-
- {os: "macOS-11", pkg-name: "pytorch", python-version: "3.9", pytorch-version: "1.11"}
44-
- {os: "macOS-11", pkg-name: "pytorch", python-version: "3.8", pytorch-version: "1.10"}
42+
# note: there's no distribution of torch==1.10 for Python>=3.10
43+
- {os: "macOS-11", pkg-name: "pytorch", python-version: "3.8", pytorch-version: "1.11"}
44+
- {os: "macOS-11", pkg-name: "pytorch", python-version: "3.9", pytorch-version: "1.12"}
4545
- {os: "ubuntu-20.04", pkg-name: "pytorch", python-version: "3.8", pytorch-version: "1.10"}
4646
- {os: "ubuntu-20.04", pkg-name: "pytorch", python-version: "3.9", pytorch-version: "1.11"}
47-
- {os: "ubuntu-20.04", pkg-name: "pytorch", python-version: "3.10", pytorch-version: "1.11"}
48-
- {os: "windows-2022", pkg-name: "pytorch", python-version: "3.8", pytorch-version: "1.10"}
49-
- {os: "windows-2022", pkg-name: "pytorch", python-version: "3.9", pytorch-version: "1.11"}
50-
- {os: "windows-2022", pkg-name: "pytorch", python-version: "3.10", pytorch-version: "1.11"}
51-
# only run PyTorch latest with Python latest
52-
- {os: "macOS-11", pkg-name: "pytorch", python-version: "3.10", pytorch-version: "1.12"}
53-
- {os: "macOS-11", pkg-name: "lightning", python-version: "3.10", pytorch-version: "1.12"}
5447
- {os: "ubuntu-20.04", pkg-name: "pytorch", python-version: "3.10", pytorch-version: "1.12"}
55-
- {os: "ubuntu-20.04", pkg-name: "lightning", python-version: "3.10", pytorch-version: "1.12"}
48+
- {os: "windows-2022", pkg-name: "pytorch", python-version: "3.9", pytorch-version: "1.11"}
5649
- {os: "windows-2022", pkg-name: "pytorch", python-version: "3.10", pytorch-version: "1.12"}
57-
- {os: "windows-2022", pkg-name: "lightning", python-version: "3.10", pytorch-version: "1.12"}
50+
# only run PyTorch latest with Python latest
51+
- {os: "macOS-11", pkg-name: "pytorch", python-version: "3.10", pytorch-version: "1.13"}
52+
- {os: "ubuntu-20.04", pkg-name: "pytorch", python-version: "3.10", pytorch-version: "1.13"}
53+
- {os: "windows-2022", pkg-name: "pytorch", python-version: "3.10", pytorch-version: "1.13"}
5854
# "oldest" versions tests, only on minimum Python
59-
- {os: "macOS-11", pkg-name: "pytorch", python-version: "3.7", pytorch-version: "1.9", requires: "oldest"}
60-
- {os: "macOS-11", pkg-name: "lightning", python-version: "3.7", pytorch-version: "1.9", requires: "oldest"}
55+
- {os: "macOS-11", pkg-name: "pytorch", python-version: "3.8", pytorch-version: "1.9", requires: "oldest"} # 3.7 hangs
6156
- {os: "ubuntu-20.04", pkg-name: "pytorch", python-version: "3.7", pytorch-version: "1.9", requires: "oldest"}
62-
- {os: "ubuntu-20.04", pkg-name: "lightning", python-version: "3.7", pytorch-version: "1.9", requires: "oldest"}
6357
- {os: "windows-2022", pkg-name: "pytorch", python-version: "3.7", pytorch-version: "1.9", requires: "oldest"}
64-
- {os: "windows-2022", pkg-name: "lightning", python-version: "3.7", pytorch-version: "1.9", requires: "oldest"}
65-
# release-candidate tests, mixed Python versions
66-
- {os: "macOS-11", pkg-name: "pytorch", python-version: "3.10", pytorch-version: "1.13", release: "pre"}
67-
- {os: "ubuntu-20.04", pkg-name: "pytorch", python-version: "3.9", pytorch-version: "1.13", release: "pre"}
68-
- {os: "windows-2022", pkg-name: "pytorch", python-version: "3.8", pytorch-version: "1.13", release: "pre"}
6958
# run test under SLOW label
7059
- {type: "slow", os: "macOS-11", pkg-name: "pytorch", python-version: "3.7", pytorch-version: "1.11"}
7160
- {type: "slow", os: "ubuntu-20.04", pkg-name: "pytorch", python-version: "3.7", pytorch-version: "1.11"}
7261
- {type: "slow", os: "windows-2022", pkg-name: "pytorch", python-version: "3.7", pytorch-version: "1.11"}
62+
# "lightning" installs the monolithic package
63+
- {os: "macOS-11", pkg-name: "lightning", python-version: "3.8", pytorch-version: "1.13"}
64+
- {os: "ubuntu-20.04", pkg-name: "lightning", python-version: "3.8", pytorch-version: "1.13"}
65+
- {os: "windows-2022", pkg-name: "lightning", python-version: "3.8", pytorch-version: "1.13"}
7366

74-
timeout-minutes: 60
67+
timeout-minutes: 70 # tests with macOS-11, py3.7 oldest takes much longer then expected
7568

7669
steps:
7770
- uses: actions/checkout@v3

requirements/lite/base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# in case you want to preserve/enforce restrictions on the latest compatible version, add "strict" as an in-line comment
33

44
numpy>=1.17.2, <1.23.1
5-
torch>=1.9.*, <1.13.0
5+
torch>=1.9.*, <=1.13.0
66
fsspec[http]>2021.06.0, <2022.6.0
77
packaging>=17.0, <=21.3
88
typing-extensions>=4.0.0, <=4.4.0

requirements/pytorch/adjust-versions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
# IMPORTANT: this list needs to be sorted in reverse
77
VERSIONS = [
8-
dict(torch="1.13.0", torchvision="0.14.0"), # RC
9-
dict(torch="1.12.1", torchvision="0.13.1"), # stable
8+
dict(torch="1.13.0", torchvision="0.14.0"), # stable
9+
dict(torch="1.12.1", torchvision="0.13.1"),
1010
dict(torch="1.12.0", torchvision="0.13.0"),
1111
dict(torch="1.11.0", torchvision="0.12.0"),
1212
dict(torch="1.10.2", torchvision="0.11.3"),

requirements/pytorch/base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# in case you want to preserve/enforce restrictions on the latest compatible version, add "strict" as an in-line comment
33

44
numpy>=1.17.2, <1.23.1
5-
torch>=1.9.*, <1.13.0
5+
torch>=1.9.*, <=1.13.0
66
tqdm>=4.57.0, <4.65.0
77
PyYAML>=5.4, <=6.0
88
fsspec[http]>2021.06.0, <2022.8.0
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import hydra # noqa: F401
2-
import jsonargparse # noqa: F401
3-
import matplotlib # noqa: F401
4-
import omegaconf # noqa: F401
5-
import rich # noqa: F401
1+
if __name__ == "__main__":
2+
import hydra # noqa: F401
3+
import jsonargparse # noqa: F401
4+
import matplotlib # noqa: F401
5+
import omegaconf # noqa: F401
6+
import rich # noqa: F401
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import bagua # noqa: F401
2-
import deepspeed # noqa: F401
3-
import fairscale # noqa: F401
4-
import horovod.torch
1+
if __name__ == "__main__":
2+
import bagua # noqa: F401
3+
import deepspeed # noqa: F401
4+
import fairscale # noqa: F401
5+
import horovod.torch
56

6-
# returns an error code
7-
assert horovod.torch.nccl_built()
7+
# returns an error code
8+
assert horovod.torch.nccl_built()
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
coverage
22
codecov>=2.1
3-
pytest>=3.0.5
3+
pytest>=5.0.0
44
pytest-cov
55
pytest-flake8
66
flake8
77
check-manifest
8-
twine==1.13.0
8+
twine==4.0.1
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
coverage
22
codecov>=2.1
3-
pytest>=3.0.5
3+
pytest>=5.0.0
44
pytest-cov
55
pytest-flake8
66
flake8
77
check-manifest
8-
twine==1.13.0
8+
twine==4.0.1

0 commit comments

Comments
 (0)