@@ -12,15 +12,31 @@ trigger:
1212 - " master"
1313 - " release/*"
1414 - " refs/tags/*"
15+ paths :
16+ include :
17+ - " .azure/**"
18+ - " examples/run_ddp_examples.sh"
19+ - " examples/convert_from_pt_to_pl/**"
20+ - " examples/run_pl_examples.sh"
21+ - " examples/pl_basics/backbone_image_classifier.py"
22+ - " examples/pl_basics/autoencoder.py"
23+ - " examples/pl_loops/mnist_lite.py"
24+ - " examples/pl_fault_tolerant/automatic.py"
25+ - " examples/test_pl_examples.py"
26+ - " examples/pl_integrations/dali_image_classifier.py"
27+ - " requirements/pytorch/**"
28+ - " src/pytorch_lightning/**"
29+ - " tests/tests_pytorch/**"
30+ - " setup.cfg"
31+ - " pyproject.toml"
32+ - " .github/workflows/ci-pytorch*.yml"
33+ - " .github/workflows/docs-*.yml"
34+
1535
1636pr :
1737 - " master"
1838 - " release/*"
1939
20- variables :
21- - name : continue
22- value : ' 1'
23-
2440jobs :
2541 - job : testing
2642 strategy :
4157 clean : all
4258
4359 steps :
44-
45- - bash : |
46- CHANGED_FILES=$(git diff --name-status origin/master -- . | awk '{print $2}')
47- FILTER='src/pytorch_lightning|requirements/pytorch|tests/tests_pytorch|examples/pl_*'
48- echo $CHANGED_FILES > changed_files.txt
49- MATCHES=$(cat changed_files.txt | grep -E $FILTER)
50- echo $MATCHES
51- if [ -z "$MATCHES" ]; then
52- echo "Skip"
53- echo "##vso[task.setvariable variable=continue]0"
54- else
55- echo "Continue"
56- echo "##vso[task.setvariable variable=continue]1"
57- fi
58- displayName: Skipper
59-
6060 - bash : |
6161 lspci | egrep 'VGA|3D'
6262 whereis nvidia
6666 pip --version
6767 pip list
6868 displayName: 'Image info & NVIDIA'
69- condition: eq(variables['continue'], '1')
7069
7170 - bash : |
7271 python -c "fname = 'requirements/pytorch/strategies.txt' ; lines = [line for line in open(fname).readlines() if 'horovod' not in line] ; open(fname, 'w').writelines(lines)"
7978 PACKAGE_NAME: pytorch
8079 FREEZE_REQUIREMENTS: 1
8180 displayName: 'Install dependencies'
82- condition: eq(variables['continue'], '1')
8381
8482 - bash : |
8583 set -e
@@ -88,24 +86,20 @@ jobs:
8886 python requirements/pytorch/check-avail-strategies.py
8987 python requirements/pytorch/check-avail-extras.py
9088 displayName: 'Env details'
91- condition: eq(variables['continue'], '1')
9289
9390 - bash : bash .actions/pull_legacy_checkpoints.sh
9491 displayName : ' Get legacy checkpoints'
95- condition : eq(variables['continue'], '1')
9692
9793 - bash : python -m coverage run --source pytorch_lightning -m pytest
9894 workingDirectory : src/pytorch_lightning
9995 displayName : ' Testing: PyTorch doctests'
100- condition : eq(variables['continue'], '1')
10196
10297 - bash : python -m coverage run --source pytorch_lightning -m pytest --ignore benchmarks -v --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=50
10398 env :
10499 PL_RUN_CUDA_TESTS : " 1"
105100 workingDirectory : tests/tests_pytorch
106101 displayName : ' Testing: PyTorch standard'
107102 timeoutInMinutes : " 35"
108- condition : eq(variables['continue'], '1')
109103
110104 - bash : bash run_standalone_tests.sh
111105 workingDirectory : tests/tests_pytorch
@@ -114,7 +108,14 @@ jobs:
114108 PL_RUN_CUDA_TESTS : " 1"
115109 displayName : ' Testing: PyTorch standalone tests'
116110 timeoutInMinutes : " 35"
117- condition : eq(variables['continue'], '1')
111+
112+ - bash : bash run_standalone_tasks.sh
113+ workingDirectory : tests/tests_pytorch
114+ env :
115+ PL_USE_MOCKED_MNIST : " 1"
116+ PL_RUN_CUDA_TESTS : " 1"
117+ displayName : ' Testing: PyTorch standalone tasks'
118+ timeoutInMinutes : " 10"
118119
119120 - bash : |
120121 python -m coverage report
@@ -124,14 +125,13 @@ jobs:
124125 ls -l
125126 workingDirectory: tests/tests_pytorch
126127 displayName: 'Statistics'
127- condition: eq(variables['continue'], '1')
128128
129129 - task : PublishTestResults@2
130130 displayName : ' Publish test results'
131131 inputs :
132132 testResultsFiles : ' $(Build.StagingDirectory)/test-results.xml'
133133 testRunTitle : ' $(Agent.OS) - $(Build.DefinitionName) - Python $(python.version)'
134- condition : and( succeededOrFailed(), eq(variables['continue'], '1') )
134+ condition : succeededOrFailed()
135135
136136 - script : |
137137 set -e
@@ -143,11 +143,9 @@ jobs:
143143 env:
144144 PL_USE_MOCKED_MNIST: "1"
145145 displayName: 'Testing: PyTorch examples'
146- condition: eq(variables['continue'], '1')
147146
148147 - bash : python -m pytest benchmarks -v --maxfail=2 --durations=0
149148 workingDirectory : tests/tests_pytorch
150149 env :
151150 PL_RUN_CUDA_TESTS : " 1"
152151 displayName : ' Testing: PyTorch benchmarks'
153- condition : eq(variables['continue'], '1')
0 commit comments