@@ -50,23 +50,23 @@ jobs:
50
50
strategy :
51
51
matrix :
52
52
" PyTorch | oldest " :
53
- image : " pytorchlightning/pytorch_lightning:base-cuda -py3.10-torch2.1-cuda12.1 .1"
53
+ image : " pytorchlightning/pytorch_lightning:base-cuda12.1.1 -py3.10-torch2.1"
54
54
PACKAGE_NAME : " pytorch"
55
55
" PyTorch | latest " :
56
- image : " pytorchlightning/pytorch_lightning:base-cuda-py3.12-torch2.6-cuda12.4.1"
57
- PACKAGE_NAME : " pytorch"
58
- " PyTorch | future " :
59
- image : " pytorchlightning/pytorch_lightning:base-cuda-py3.12-torch2.7-cuda12.6.3"
56
+ image : " pytorchlightning/pytorch_lightning:base-cuda12.6.3-py3.12-torch2.8"
60
57
PACKAGE_NAME : " pytorch"
58
+ # "PyTorch | future":
59
+ # image: "pytorchlightning/pytorch_lightning:base-cuda12.6.3-py3.12-torch2.7"
60
+ # PACKAGE_NAME: "pytorch"
61
61
" Lightning | latest " :
62
- image : " pytorchlightning/pytorch_lightning:base-cuda -py3.12-torch2.6-cuda12.4.1 "
62
+ image : " pytorchlightning/pytorch_lightning:base-cuda12.6.3 -py3.12-torch2.8 "
63
63
PACKAGE_NAME : " lightning"
64
64
pool : lit-rtx-3090
65
65
variables :
66
66
DEVICES : $( python -c 'print("$(Agent.Name)".split("_")[-1])' )
67
67
FREEZE_REQUIREMENTS : " 1"
68
68
PIP_CACHE_DIR : " /var/tmp/pip"
69
- PL_RUN_CUDA_TESTS : " 1"
69
+ RUN_ONLY_CUDA_TESTS : " 1"
70
70
container :
71
71
image : $(image)
72
72
# default shm size is 64m. Increase it to avoid:
82
82
echo "##vso[task.setvariable variable=TORCH_URL]https://download.pytorch.org/whl/cu${cuda_ver}/torch_stable.html"
83
83
scope=$(python -c 'n = "$(PACKAGE_NAME)" ; print(dict(pytorch="pytorch_lightning").get(n, n))')
84
84
echo "##vso[task.setvariable variable=COVERAGE_SOURCE]$scope"
85
- python_ver=$(python -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')")
86
- echo "##vso[task.setvariable variable=PYTHON_VERSION_MM]$python_ver"
87
85
displayName: "set env. vars"
88
86
- bash : |
89
87
echo "##vso[task.setvariable variable=TORCH_URL]https://download.pytorch.org/whl/test/cu${CUDA_VERSION_MM}"
@@ -104,6 +102,20 @@ jobs:
104
102
pip list
105
103
displayName: "Image info & NVIDIA"
106
104
105
+ - bash : |
106
+ set -ex
107
+ pip install "cython<3.0" wheel # for compatibility
108
+ pip install -U "lightning-utilities[cli]"
109
+ cd requirements/pytorch
110
+ # replace range by pin minimal requirements
111
+ python -m lightning_utilities.cli requirements set-oldest --req_files "['base.txt', 'extra.txt', 'strategies.txt', 'examples.txt']"
112
+ # drop deepspeed since it is not supported by our minimal Torch requirements
113
+ python -m lightning_utilities.cli requirements prune-pkgs --packages deepspeed --req_files strategies.txt
114
+ # uninstall deepspeed since some older docker images have it pre-installed
115
+ pip uninstall -y deepspeed
116
+ condition: contains(variables['Agent.JobName'], 'oldest')
117
+ displayName: "setting oldest dependencies"
118
+
107
119
- bash : |
108
120
PYTORCH_VERSION=$(python -c "import torch; print(torch.__version__.split('+')[0])")
109
121
pip install -q wget packaging
@@ -113,11 +125,22 @@ jobs:
113
125
done
114
126
displayName: "Adjust dependencies"
115
127
128
+ - bash : |
129
+ pip install -U -q -r .actions/requirements.txt
130
+ python .actions/assistant.py copy_replace_imports --source_dir="./tests/tests_pytorch" \
131
+ --source_import="lightning.fabric,lightning.pytorch" \
132
+ --target_import="lightning_fabric,pytorch_lightning"
133
+ python .actions/assistant.py copy_replace_imports --source_dir="./examples/pytorch/basics" \
134
+ --source_import="lightning.fabric,lightning.pytorch" \
135
+ --target_import="lightning_fabric,pytorch_lightning"
136
+ # without succeeded this could run even if the job has already failed
137
+ condition: and(succeeded(), eq(variables['PACKAGE_NAME'], 'pytorch'))
138
+ displayName: "Adjust tests & examples"
139
+
116
140
- bash : |
117
141
set -e
118
142
extra=$(python -c "print({'lightning': 'pytorch-'}.get('$(PACKAGE_NAME)', ''))")
119
- pip install -e ".[${extra}dev]" pytest-timeout -U --extra-index-url="${TORCH_URL}"
120
- pip install setuptools==75.6.0 jsonargparse==4.35.0
143
+ pip install -e ".[${extra}dev]" -U --upgrade-strategy=eager --extra-index-url="${TORCH_URL}"
121
144
displayName: "Install package & dependencies"
122
145
123
146
- bash : pip uninstall -y lightning
@@ -144,17 +167,6 @@ jobs:
144
167
condition : and(succeeded(), eq(variables['PACKAGE_NAME'], 'pytorch'))
145
168
displayName : " Testing: PyTorch doctests"
146
169
147
- - bash : |
148
- python .actions/assistant.py copy_replace_imports --source_dir="./tests/tests_pytorch" \
149
- --source_import="lightning.fabric,lightning.pytorch" \
150
- --target_import="lightning_fabric,pytorch_lightning"
151
- python .actions/assistant.py copy_replace_imports --source_dir="./examples/pytorch/basics" \
152
- --source_import="lightning.fabric,lightning.pytorch" \
153
- --target_import="lightning_fabric,pytorch_lightning"
154
- # without succeeded this could run even if the job has already failed
155
- condition: and(succeeded(), eq(variables['PACKAGE_NAME'], 'pytorch'))
156
- displayName: "Adjust tests & examples"
157
-
158
170
- bash : |
159
171
bash .actions/pull_legacy_checkpoints.sh
160
172
cd tests/legacy
0 commit comments