Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .actions/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
jsonargparse >=4.16.0, <=4.35.0
jsonargparse
requests
packaging
16 changes: 7 additions & 9 deletions .azure/gpu-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,13 @@ jobs:
displayName: "Image info & NVIDIA"

- bash: |
pip install -e .[dev] --find-links ${TORCH_URL}
pip install setuptools==75.6.0 jsonargparse==4.35.0
pip install -U -q -r .actions/requirements.txt
python .actions/assistant.py copy_replace_imports --source_dir="./tests" \
--source_import="lightning.fabric,lightning.pytorch" \
--target_import="lightning_fabric,pytorch_lightning"
displayName: "Adjust tests"

- bash: pip install -e .[dev] --find-links ${TORCH_URL}
env:
FREEZE_REQUIREMENTS: "1"
displayName: "Install package"
Expand All @@ -88,13 +93,6 @@ jobs:
python -c "import torch ; mgpu = torch.cuda.device_count() ; assert mgpu == 2, f'GPU: {mgpu}'"
displayName: "Env details"

- bash: |
pip install -q -r .actions/requirements.txt
python .actions/assistant.py copy_replace_imports --source_dir="./tests" \
--source_import="lightning.fabric,lightning.pytorch" \
--target_import="lightning_fabric,pytorch_lightning"
displayName: "Adjust tests"

- bash: python -m pytest parity_$(PACKAGE_NAME) -v --durations=0
env:
PL_RUNNING_BENCHMARKS: "1"
Expand Down
27 changes: 13 additions & 14 deletions .azure/gpu-tests-fabric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,22 @@ jobs:
done
displayName: "Adjust dependencies"

- bash: |
pip install -U -q -r .actions/requirements.txt
python .actions/assistant.py copy_replace_imports --source_dir="./tests/tests_fabric" \
--source_import="lightning.fabric" \
--target_import="lightning_fabric"
python .actions/assistant.py copy_replace_imports --source_dir="./examples/fabric" \
--source_import="lightning.fabric" \
--target_import="lightning_fabric"
# without succeeded this could run even if the job has already failed
condition: and(succeeded(), eq(variables['PACKAGE_NAME'], 'fabric'))
displayName: "Adjust tests & examples"

- bash: |
set -e
extra=$(python -c "print({'lightning': 'fabric-'}.get('$(PACKAGE_NAME)', ''))")
pip install -e ".[${extra}dev]" pytest-timeout -U --extra-index-url="${TORCH_URL}"
pip install setuptools==75.6.0 jsonargparse==4.35.0
pip install -e ".[${extra}dev]" -U --extra-index-url="${TORCH_URL}"
displayName: "Install package & dependencies"

- bash: |
Expand All @@ -130,18 +141,6 @@ jobs:
condition: and(succeeded(), eq(variables['PACKAGE_NAME'], 'fabric'))
displayName: "Testing: Fabric doctests"

- bash: |
pip install -q -r .actions/requirements.txt
python .actions/assistant.py copy_replace_imports --source_dir="./tests/tests_fabric" \
--source_import="lightning.fabric" \
--target_import="lightning_fabric"
python .actions/assistant.py copy_replace_imports --source_dir="./examples/fabric" \
--source_import="lightning.fabric" \
--target_import="lightning_fabric"
# without succeeded this could run even if the job has already failed
condition: and(succeeded(), eq(variables['PACKAGE_NAME'], 'fabric'))
displayName: "Adjust tests & examples"

- bash: python -m coverage run --source ${COVERAGE_SOURCE} -m pytest tests_fabric/ -v --durations=50
workingDirectory: tests/
displayName: "Testing: fabric standard"
Expand Down
25 changes: 13 additions & 12 deletions .azure/gpu-tests-pytorch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,22 @@ jobs:
done
displayName: "Adjust dependencies"

- bash: |
pip install -U -q -r .actions/requirements.txt
python .actions/assistant.py copy_replace_imports --source_dir="./tests/tests_pytorch" \
--source_import="lightning.fabric,lightning.pytorch" \
--target_import="lightning_fabric,pytorch_lightning"
python .actions/assistant.py copy_replace_imports --source_dir="./examples/pytorch/basics" \
--source_import="lightning.fabric,lightning.pytorch" \
--target_import="lightning_fabric,pytorch_lightning"
# without succeeded this could run even if the job has already failed
condition: and(succeeded(), eq(variables['PACKAGE_NAME'], 'pytorch'))
displayName: "Adjust tests & examples"

- bash: |
set -e
extra=$(python -c "print({'lightning': 'pytorch-'}.get('$(PACKAGE_NAME)', ''))")
pip install -e ".[${extra}dev]" pytest-timeout -U --extra-index-url="${TORCH_URL}"
pip install -e ".[${extra}dev]" -U --extra-index-url="${TORCH_URL}"
displayName: "Install package & dependencies"

- bash: pip uninstall -y lightning
Expand All @@ -143,17 +155,6 @@ jobs:
condition: and(succeeded(), eq(variables['PACKAGE_NAME'], 'pytorch'))
displayName: "Testing: PyTorch doctests"

- bash: |
python .actions/assistant.py copy_replace_imports --source_dir="./tests/tests_pytorch" \
--source_import="lightning.fabric,lightning.pytorch" \
--target_import="lightning_fabric,pytorch_lightning"
python .actions/assistant.py copy_replace_imports --source_dir="./examples/pytorch/basics" \
--source_import="lightning.fabric,lightning.pytorch" \
--target_import="lightning_fabric,pytorch_lightning"
# without succeeded this could run even if the job has already failed
condition: and(succeeded(), eq(variables['PACKAGE_NAME'], 'pytorch'))
displayName: "Adjust tests & examples"

- bash: |
bash .actions/pull_legacy_checkpoints.sh
cd tests/legacy
Expand Down
Loading