@@ -37,17 +37,17 @@ run: |
3737 CUDA_VERSION_M_M="${cuda_version%.*}" # Get major.minor by removing the last dot and everything after
3838 CUDA_VERSION_MM="${CUDA_VERSION_M_M//'.'/''}"
3939 TORCH_URL="https://download.pytorch.org/whl/cu${CUDA_VERSION_MM}/torch_stable.html"
40- echo ${TORCH_URL}
40+ echo "Torch URL: ${TORCH_URL}"
4141 COVERAGE_SOURCE=$(python -c 'n = "$(PACKAGE_NAME)" ; print(dict(fabric="pytorch_lightning").get(n, n))')
4242 echo "collecting coverage for: ${COVERAGE_SOURCE}"
4343
4444 if [ "${TORCH_VER}" == "2.1" ]; then
45- # Set oldest versions
45+ recho " Set oldest versions"
4646 python .actions/assistant.py replace_oldest_ver
4747 pip install "cython<3.0" wheel # for compatibility
4848 fi
4949
50- # Adjust torch versions in requirements files
50+ echo " Adjust torch versions in requirements files"
5151 PYTORCH_VERSION=$(python -c "import torch; print(torch.__version__.split('+')[0])")
5252 pip install -q wget packaging
5353 python -m wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/adjust-torch-versions.py
5656 done
5757
5858 if [ "${PACKAGE_NAME}" == "pytorch" ]; then
59+ echo "Adjust PL imports"
5960 pip install -U -q -r .actions/requirements.txt
6061 python .actions/assistant.py copy_replace_imports --source_dir="./tests/tests_pytorch" \
6162 --source_import="lightning.fabric,lightning.pytorch" \
@@ -69,10 +70,10 @@ run: |
6970 pip install -e ".[${extra}dev]" -U --upgrade-strategy=eager --extra-index-url="${TORCH_URL}"
7071
7172 if [ "${PACKAGE_NAME}" == "pytorch" ]; then
72- # Drop LAI from extensions
73+ echo "uninstall lightning to have just single package"
7374 pip uninstall -y lightning
7475 elif [ "${PACKAGE_NAME}" == "lightning" ]; then
75- # Drop PL for LAI
76+ echo "uninstall PL to have just single package"
7677 pip uninstall -y pytorch-lightning
7778 fi
7879
@@ -81,33 +82,34 @@ run: |
8182 python requirements/pytorch/check-avail-extras.py
8283 python -c "import bitsandbytes"
8384
84- # Testing: Fabric doctests
85+ echo " Testing: Fabric doctests"
8586 if [ "${PACKAGE_NAME}" == "pytorch" ]; then
8687 cd src/
8788 python -m pytest pytorch_lightning
8889 cd ..
8990 fi
9091
91- # Get legacy checkpoints
92+ echo " Get legacy checkpoints"
9293 bash .actions/pull_legacy_checkpoints.sh
9394 cd tests/legacy
9495 bash generate_checkpoints.sh
9596 ls -l checkpoints/
9697
9798 cd tests/
98- # Testing: fabric standard
99+ echo " Testing: fabric standard"
99100 python -m coverage run --source ${COVERAGE_SOURCE} -m pytest tests_pytorch/ -v --durations=50
100101
101- # Testing: fabric standalone
102+ echo " Testing: fabric standalone"
102103 export PL_USE_MOCKED_MNIST=1
103104 export PL_RUN_STANDALONE_TESTS=1
104105 wget https://raw.githubusercontent.com/Lightning-AI/utilities/main/scripts/run_standalone_tests.sh
105106 bash ./run_standalone_tests.sh "tests_pytorch"
106107
107- # Testing: PyTorch standalone tasks
108+ echo " Testing: PyTorch standalone tasks"
108109 cd tests_pytorch/
109110 bash run_standalone_tasks.sh
110111
112+ echo "Reporting coverage"
111113 python -m coverage report
112114 python -m coverage xml
113115 python -m coverage html
@@ -121,7 +123,7 @@ run: |
121123 # ls -l
122124 cd ../..
123125
124- # Testing: PyTorch examples
126+ echo " Testing: PyTorch examples"
125127 cd examples/
126128 bash run_pl_examples.sh --trainer.accelerator=gpu --trainer.devices=1
127129 bash run_pl_examples.sh --trainer.accelerator=gpu --trainer.devices=2 --trainer.strategy=ddp
0 commit comments