@@ -53,11 +53,15 @@ jobs:
5353 matrix :
5454 ' PyTorch | latest ' :
5555 image : " pytorchlightning/pytorch_lightning:base-cuda-py3.10-torch2.0-cuda11.7.1"
56- scope : " "
56+ IS_NIGHTLY : " false "
5757 PACKAGE_NAME : " pytorch"
5858 ' Lightning | latest ' :
5959 image : " pytorchlightning/pytorch_lightning:base-cuda-py3.10-torch2.0-cuda11.7.1"
60- scope : " "
60+ IS_NIGHTLY : " false"
61+ PACKAGE_NAME : " lightning"
62+ ' Lightning | nightly ' :
63+ image : " pytorchlightning/pytorch_lightning:base-cuda-py3.10-torch2.0-cuda11.7.1"
64+ IS_NIGHTLY : " true"
6165 PACKAGE_NAME : " lightning"
6266 pool : lit-rtx-3090
6367 variables :
8791 echo $CUDA_VISIBLE_DEVICES
8892 echo $CUDA_VERSION_MM
8993 echo $TORCH_URL
94+ echo $(IS_NIGHTLY)
9095 echo $COVERAGE_SOURCE
9196 whereis nvidia
9297 nvidia-smi
@@ -103,18 +108,30 @@ jobs:
103108 for fpath in `ls requirements/**/*.txt`; do \
104109 python ./adjust-torch-versions.py $fpath ${PYTORCH_VERSION}; \
105110 done
106- # prune packages with installation issues
111+ # without succeeded this could run even if the job has already failed
112+ condition: and(succeeded(), eq(variables.IS_NIGHTLY, 'false'))
113+ displayName: 'Adjust dependencies'
114+
115+ - bash : |
107116 pip install -q -r .actions/requirements.txt
108117 python .actions/assistant.py requirements_prune_pkgs \
109118 --packages="[lightning-colossalai,lightning-bagua]" \
110119 --req_files="[requirements/_integrations/strategies.txt]"
111- displayName: 'Adjust dependencies'
120+ displayName: 'Prune packages' # these have installation issues
112121
113122 - bash : |
114123 extra=$(python -c "print({'lightning': 'pytorch-'}.get('$(PACKAGE_NAME)', ''))")
115124 pip install -e ".[${extra}dev]" -r requirements/_integrations/strategies.txt pytest-timeout -U --find-links ${TORCH_URL}
116125 displayName: 'Install package & dependencies'
117126
127+ - bash : |
128+ pip uninstall -y torch torchvision
129+ pip install torch torchvision -U --pre --no-cache --index-url https://download.pytorch.org/whl/nightly/cu${CUDA_VERSION_MM%}
130+ python -c "from torch import __version__ as ver; assert ver.startswith('2.1.0'), ver"
131+ # without succeeded this could run even if the job has already failed
132+ condition: and(succeeded(), eq(variables.IS_NIGHTLY, 'true'))
133+ displayName: 'Bump to nightly'
134+
118135 - bash : pip uninstall -y lightning
119136 condition : eq(variables['PACKAGE_NAME'], 'pytorch')
120137 # Lightning is dependency of Habana or other accelerators/integrations so in case we test PL we need to remove it
0 commit comments