@@ -12,31 +12,15 @@ 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-
3515
3616pr :
3717 - " master"
3818 - " release/*"
3919
20+ variables :
21+ - name : continue
22+ value : ' 1'
23+
4024jobs :
4125 - job : testing
4226 strategy :
5741 clean : all
5842
5943 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')
6970
7071 - bash : |
7172 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)"
7879 PACKAGE_NAME: pytorch
7980 FREEZE_REQUIREMENTS: 1
8081 displayName: 'Install dependencies'
82+ condition: eq(variables['continue'], '1')
8183
8284 - bash : |
8385 set -e
@@ -86,20 +88,24 @@ jobs:
8688 python requirements/pytorch/check-avail-strategies.py
8789 python requirements/pytorch/check-avail-extras.py
8890 displayName: 'Env details'
91+ condition: eq(variables['continue'], '1')
8992
9093 - bash : bash .actions/pull_legacy_checkpoints.sh
9194 displayName : ' Get legacy checkpoints'
95+ condition : eq(variables['continue'], '1')
9296
9397 - bash : python -m coverage run --source pytorch_lightning -m pytest
9498 workingDirectory : src/pytorch_lightning
9599 displayName : ' Testing: PyTorch doctests'
100+ condition : eq(variables['continue'], '1')
96101
97102 - bash : python -m coverage run --source pytorch_lightning -m pytest --ignore benchmarks -v --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=50
98103 env :
99104 PL_RUN_CUDA_TESTS : " 1"
100105 workingDirectory : tests/tests_pytorch
101106 displayName : ' Testing: PyTorch standard'
102107 timeoutInMinutes : " 35"
108+ condition : eq(variables['continue'], '1')
103109
104110 - bash : bash run_standalone_tests.sh
105111 workingDirectory : tests/tests_pytorch
@@ -108,14 +114,7 @@ jobs:
108114 PL_RUN_CUDA_TESTS : " 1"
109115 displayName : ' Testing: PyTorch standalone tests'
110116 timeoutInMinutes : " 35"
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"
117+ condition : eq(variables['continue'], '1')
119118
120119 - bash : |
121120 python -m coverage report
@@ -125,13 +124,14 @@ jobs:
125124 ls -l
126125 workingDirectory: tests/tests_pytorch
127126 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 : succeededOrFailed()
134+ condition : and( succeededOrFailed(), eq(variables['continue'], '1') )
135135
136136 - script : |
137137 set -e
@@ -143,9 +143,11 @@ jobs:
143143 env:
144144 PL_USE_MOCKED_MNIST: "1"
145145 displayName: 'Testing: PyTorch examples'
146+ condition: eq(variables['continue'], '1')
146147
147148 - bash : python -m pytest benchmarks -v --maxfail=2 --durations=0
148149 workingDirectory : tests/tests_pytorch
149150 env :
150151 PL_RUN_CUDA_TESTS : " 1"
151152 displayName : ' Testing: PyTorch benchmarks'
153+ condition : eq(variables['continue'], '1')
0 commit comments