@@ -50,23 +50,23 @@ jobs:
5050 strategy :
5151 matrix :
5252 " 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"
5454 PACKAGE_NAME : " pytorch"
5555 " 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"
6057 PACKAGE_NAME : " pytorch"
58+ # "PyTorch | future":
59+ # image: "pytorchlightning/pytorch_lightning:base-cuda12.6.3-py3.12-torch2.7"
60+ # PACKAGE_NAME: "pytorch"
6161 " 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 "
6363 PACKAGE_NAME : " lightning"
6464 pool : lit-rtx-3090
6565 variables :
6666 DEVICES : $( python -c 'print("$(Agent.Name)".split("_")[-1])' )
6767 FREEZE_REQUIREMENTS : " 1"
6868 PIP_CACHE_DIR : " /var/tmp/pip"
69- PL_RUN_CUDA_TESTS : " 1"
69+ RUN_ONLY_CUDA_TESTS : " 1"
7070 container :
7171 image : $(image)
7272 # default shm size is 64m. Increase it to avoid:
8282 echo "##vso[task.setvariable variable=TORCH_URL]https://download.pytorch.org/whl/cu${cuda_ver}/torch_stable.html"
8383 scope=$(python -c 'n = "$(PACKAGE_NAME)" ; print(dict(pytorch="pytorch_lightning").get(n, n))')
8484 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"
8785 displayName: "set env. vars"
8886 - bash : |
8987 echo "##vso[task.setvariable variable=TORCH_URL]https://download.pytorch.org/whl/test/cu${CUDA_VERSION_MM}"
@@ -104,6 +102,20 @@ jobs:
104102 pip list
105103 displayName: "Image info & NVIDIA"
106104
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+
107119 - bash : |
108120 PYTORCH_VERSION=$(python -c "import torch; print(torch.__version__.split('+')[0])")
109121 pip install -q wget packaging
@@ -113,11 +125,22 @@ jobs:
113125 done
114126 displayName: "Adjust dependencies"
115127
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+
116140 - bash : |
117141 set -e
118142 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}"
121144 displayName: "Install package & dependencies"
122145
123146 - bash : pip uninstall -y lightning
@@ -144,17 +167,6 @@ jobs:
144167 condition : and(succeeded(), eq(variables['PACKAGE_NAME'], 'pytorch'))
145168 displayName : " Testing: PyTorch doctests"
146169
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-
158170 - bash : |
159171 bash .actions/pull_legacy_checkpoints.sh
160172 cd tests/legacy
0 commit comments