9393 python ./requirements/pytorch/adjust-versions.py requirements/pytorch/examples.txt ${PYTORCH_VERSION}
9494 displayName: 'Adjust dependencies'
9595
96- - bash : |
97- pip install -e . --find-links ${TORCH_URL}
98- git checkout -- setup.py MANIFEST.in
99- env:
100- PACKAGE_NAME: "lite"
101- FREEZE_REQUIREMENTS: "1"
102- # Lite shall have pin version, so to keep development aligned we need to install lite from source not from pypi
103- # also installing from source not from on-the-fly created package to prevent accidental interaction with cache
104- displayName: 'Install Lite pkg'
105-
10696 - bash : pip install -e .[strategies] -r requirements/pytorch/devel.txt -r requirements/pytorch/examples.txt --find-links ${TORCH_URL}
10797 env :
10898 PACKAGE_NAME : " pytorch"
@@ -130,6 +120,20 @@ jobs:
130120 python requirements/pytorch/check-avail-extras.py
131121 displayName: 'Env details'
132122
123+ - bash : bash .actions/pull_legacy_checkpoints.sh
124+ displayName : ' Get legacy checkpoints'
125+
126+ - bash : python -m pytest pytorch_lightning
127+ workingDirectory : src
128+ displayName : ' Testing: PyTorch doctests'
129+
130+ - bash : python -m coverage run --source pytorch_lightning -m pytest --ignore benchmarks -v --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=50
131+ env :
132+ PL_RUN_CUDA_TESTS : " 1"
133+ workingDirectory : tests/tests_pytorch
134+ displayName : ' Testing: PyTorch standard'
135+ timeoutInMinutes : " 35"
136+
133137 - bash : bash run_standalone_tests.sh
134138 workingDirectory : tests/tests_pytorch
135139 env :
@@ -138,3 +142,44 @@ jobs:
138142 PL_STANDALONE_TESTS_SOURCE : " pytorch_lightning"
139143 displayName : ' Testing: PyTorch standalone tests'
140144 timeoutInMinutes : " 35"
145+
146+ - bash : bash run_standalone_tasks.sh
147+ workingDirectory : tests/tests_pytorch
148+ env :
149+ PL_USE_MOCKED_MNIST : " 1"
150+ PL_RUN_CUDA_TESTS : " 1"
151+ displayName : ' Testing: PyTorch standalone tasks'
152+ timeoutInMinutes : " 10"
153+
154+ - bash : |
155+ python -m coverage report
156+ python -m coverage xml
157+ python -m coverage html
158+ python -m codecov --token=$(CODECOV_TOKEN) --commit=$(Build.SourceVersion) --flags=gpu,pytest --name="GPU-coverage" --env=linux,azure
159+ ls -l
160+ workingDirectory: tests/tests_pytorch
161+ displayName: 'Statistics'
162+
163+ - task : PublishTestResults@2
164+ displayName : ' Publish test results'
165+ inputs :
166+ testResultsFiles : ' $(Build.StagingDirectory)/test-results.xml'
167+ testRunTitle : ' $(Agent.OS) - $(Build.DefinitionName) - Python $(python.version)'
168+ condition : succeededOrFailed()
169+
170+ - script : |
171+ set -e
172+ bash run_ddp_examples.sh
173+ bash run_pl_examples.sh --trainer.accelerator=gpu --trainer.devices=1
174+ bash run_pl_examples.sh --trainer.accelerator=gpu --trainer.devices=2 --trainer.strategy=ddp
175+ bash run_pl_examples.sh --trainer.accelerator=gpu --trainer.devices=2 --trainer.strategy=ddp --trainer.precision=16
176+ workingDirectory: examples
177+ env:
178+ PL_USE_MOCKED_MNIST: "1"
179+ displayName: 'Testing: PyTorch examples'
180+
181+ - bash : python -m pytest benchmarks -v --maxfail=2 --durations=0
182+ workingDirectory : tests/tests_pytorch
183+ env :
184+ PL_RUN_CUDA_TESTS : " 1"
185+ displayName : ' Testing: PyTorch benchmarks'
0 commit comments