@@ -104,6 +104,12 @@ jobs:
104104 pip list
105105 displayName: "Image info & NVIDIA"
106106
107+ - bash : |
108+ python .actions/assistant.py replace_oldest_ver
109+ pip install "cython<3.0" wheel # for compatibility
110+ condition: contains(variables['Agent.JobName'], 'oldest')
111+ displayName: "setting oldest dependencies"
112+
107113 - bash : |
108114 PYTORCH_VERSION=$(python -c "import torch; print(torch.__version__.split('+')[0])")
109115 pip install -q wget packaging
@@ -113,10 +119,22 @@ jobs:
113119 done
114120 displayName: "Adjust dependencies"
115121
122+ - bash : |
123+ pip install -U -q -r .actions/requirements.txt
124+ python .actions/assistant.py copy_replace_imports --source_dir="./tests/tests_pytorch" \
125+ --source_import="lightning.fabric,lightning.pytorch" \
126+ --target_import="lightning_fabric,pytorch_lightning"
127+ python .actions/assistant.py copy_replace_imports --source_dir="./examples/pytorch/basics" \
128+ --source_import="lightning.fabric,lightning.pytorch" \
129+ --target_import="lightning_fabric,pytorch_lightning"
130+ # without succeeded this could run even if the job has already failed
131+ condition: and(succeeded(), eq(variables['PACKAGE_NAME'], 'pytorch'))
132+ displayName: "Adjust tests & examples"
133+
116134 - bash : |
117135 set -e
118136 extra=$(python -c "print({'lightning': 'pytorch-'}.get('$(PACKAGE_NAME)', ''))")
119- pip install -e ".[${extra}dev]" pytest-timeout -U --extra-index-url="${TORCH_URL}"
137+ pip install -e ".[${extra}dev]" -U --extra-index-url="${TORCH_URL}"
120138 displayName: "Install package & dependencies"
121139
122140 - bash : pip uninstall -y lightning
@@ -143,17 +161,6 @@ jobs:
143161 condition : and(succeeded(), eq(variables['PACKAGE_NAME'], 'pytorch'))
144162 displayName : " Testing: PyTorch doctests"
145163
146- - bash : |
147- python .actions/assistant.py copy_replace_imports --source_dir="./tests/tests_pytorch" \
148- --source_import="lightning.fabric,lightning.pytorch" \
149- --target_import="lightning_fabric,pytorch_lightning"
150- python .actions/assistant.py copy_replace_imports --source_dir="./examples/pytorch/basics" \
151- --source_import="lightning.fabric,lightning.pytorch" \
152- --target_import="lightning_fabric,pytorch_lightning"
153- # without succeeded this could run even if the job has already failed
154- condition: and(succeeded(), eq(variables['PACKAGE_NAME'], 'pytorch'))
155- displayName: "Adjust tests & examples"
156-
157164 - bash : |
158165 bash .actions/pull_legacy_checkpoints.sh
159166 cd tests/legacy
0 commit comments