Skip to content

Commit e11fae5

Browse files
authored
ci/gpu: drop duplicate/confusing dep. installations (#20935)
* ci/gpu: drop duplicate/confusing dep. installations * req? * jsonargparse <4.27.0 * swap * jsonargparse >=4.27.0 * -U
1 parent 6e90049 commit e11fae5

File tree

4 files changed

+34
-36
lines changed

4 files changed

+34
-36
lines changed

.actions/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
jsonargparse >=4.16.0, <=4.35.0
1+
jsonargparse
22
requests
33
packaging

.azure/gpu-benchmarks.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,13 @@ jobs:
7676
displayName: "Image info & NVIDIA"
7777
7878
- bash: |
79-
pip install -e .[dev] --find-links ${TORCH_URL}
80-
pip install setuptools==75.6.0 jsonargparse==4.35.0
79+
pip install -U -q -r .actions/requirements.txt
80+
python .actions/assistant.py copy_replace_imports --source_dir="./tests" \
81+
--source_import="lightning.fabric,lightning.pytorch" \
82+
--target_import="lightning_fabric,pytorch_lightning"
83+
displayName: "Adjust tests"
84+
85+
- bash: pip install -e .[dev] --find-links ${TORCH_URL}
8186
env:
8287
FREEZE_REQUIREMENTS: "1"
8388
displayName: "Install package"
@@ -88,13 +93,6 @@ jobs:
8893
python -c "import torch ; mgpu = torch.cuda.device_count() ; assert mgpu == 2, f'GPU: {mgpu}'"
8994
displayName: "Env details"
9095
91-
- bash: |
92-
pip install -q -r .actions/requirements.txt
93-
python .actions/assistant.py copy_replace_imports --source_dir="./tests" \
94-
--source_import="lightning.fabric,lightning.pytorch" \
95-
--target_import="lightning_fabric,pytorch_lightning"
96-
displayName: "Adjust tests"
97-
9896
- bash: python -m pytest parity_$(PACKAGE_NAME) -v --durations=0
9997
env:
10098
PL_RUNNING_BENCHMARKS: "1"

.azure/gpu-tests-fabric.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,22 @@ jobs:
109109
done
110110
displayName: "Adjust dependencies"
111111
112+
- bash: |
113+
pip install -U -q -r .actions/requirements.txt
114+
python .actions/assistant.py copy_replace_imports --source_dir="./tests/tests_fabric" \
115+
--source_import="lightning.fabric" \
116+
--target_import="lightning_fabric"
117+
python .actions/assistant.py copy_replace_imports --source_dir="./examples/fabric" \
118+
--source_import="lightning.fabric" \
119+
--target_import="lightning_fabric"
120+
# without succeeded this could run even if the job has already failed
121+
condition: and(succeeded(), eq(variables['PACKAGE_NAME'], 'fabric'))
122+
displayName: "Adjust tests & examples"
123+
112124
- bash: |
113125
set -e
114126
extra=$(python -c "print({'lightning': 'fabric-'}.get('$(PACKAGE_NAME)', ''))")
115-
pip install -e ".[${extra}dev]" pytest-timeout -U --extra-index-url="${TORCH_URL}"
116-
pip install setuptools==75.6.0 jsonargparse==4.35.0
127+
pip install -e ".[${extra}dev]" -U --extra-index-url="${TORCH_URL}"
117128
displayName: "Install package & dependencies"
118129
119130
- bash: |
@@ -130,18 +141,6 @@ jobs:
130141
condition: and(succeeded(), eq(variables['PACKAGE_NAME'], 'fabric'))
131142
displayName: "Testing: Fabric doctests"
132143

133-
- bash: |
134-
pip install -q -r .actions/requirements.txt
135-
python .actions/assistant.py copy_replace_imports --source_dir="./tests/tests_fabric" \
136-
--source_import="lightning.fabric" \
137-
--target_import="lightning_fabric"
138-
python .actions/assistant.py copy_replace_imports --source_dir="./examples/fabric" \
139-
--source_import="lightning.fabric" \
140-
--target_import="lightning_fabric"
141-
# without succeeded this could run even if the job has already failed
142-
condition: and(succeeded(), eq(variables['PACKAGE_NAME'], 'fabric'))
143-
displayName: "Adjust tests & examples"
144-
145144
- bash: python -m coverage run --source ${COVERAGE_SOURCE} -m pytest tests_fabric/ -v --durations=50
146145
workingDirectory: tests/
147146
displayName: "Testing: fabric standard"

.azure/gpu-tests-pytorch.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,22 @@ jobs:
113113
done
114114
displayName: "Adjust dependencies"
115115
116+
- bash: |
117+
pip install -U -q -r .actions/requirements.txt
118+
python .actions/assistant.py copy_replace_imports --source_dir="./tests/tests_pytorch" \
119+
--source_import="lightning.fabric,lightning.pytorch" \
120+
--target_import="lightning_fabric,pytorch_lightning"
121+
python .actions/assistant.py copy_replace_imports --source_dir="./examples/pytorch/basics" \
122+
--source_import="lightning.fabric,lightning.pytorch" \
123+
--target_import="lightning_fabric,pytorch_lightning"
124+
# without succeeded this could run even if the job has already failed
125+
condition: and(succeeded(), eq(variables['PACKAGE_NAME'], 'pytorch'))
126+
displayName: "Adjust tests & examples"
127+
116128
- bash: |
117129
set -e
118130
extra=$(python -c "print({'lightning': 'pytorch-'}.get('$(PACKAGE_NAME)', ''))")
119-
pip install -e ".[${extra}dev]" pytest-timeout -U --extra-index-url="${TORCH_URL}"
131+
pip install -e ".[${extra}dev]" -U --extra-index-url="${TORCH_URL}"
120132
displayName: "Install package & dependencies"
121133
122134
- bash: pip uninstall -y lightning
@@ -143,17 +155,6 @@ jobs:
143155
condition: and(succeeded(), eq(variables['PACKAGE_NAME'], 'pytorch'))
144156
displayName: "Testing: PyTorch doctests"
145157

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-
157158
- bash: |
158159
bash .actions/pull_legacy_checkpoints.sh
159160
cd tests/legacy

0 commit comments

Comments
 (0)