@@ -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 set -e
8182 PACKAGE_NAME: pytorch
8283 FREEZE_REQUIREMENTS: 1
8384 displayName: 'Install dependencies'
85+ condition: eq(variables['continue'], '1')
8486
8587 - bash : |
8688 set -e
@@ -89,20 +91,24 @@ jobs:
8991 python requirements/pytorch/check-avail-strategies.py
9092 python requirements/pytorch/check-avail-extras.py
9193 displayName: 'Env details'
94+ condition: eq(variables['continue'], '1')
9295
9396 - bash : bash .actions/pull_legacy_checkpoints.sh
9497 displayName : ' Get legacy checkpoints'
98+ condition : eq(variables['continue'], '1')
9599
96100 - bash : python -m coverage run --source pytorch_lightning -m pytest
97101 workingDirectory : src/pytorch_lightning
98102 displayName : ' Testing: PyTorch doctests'
103+ condition : eq(variables['continue'], '1')
99104
100105 - bash : python -m coverage run --source pytorch_lightning -m pytest --ignore benchmarks -v --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=50
101106 env :
102107 PL_RUN_CUDA_TESTS : " 1"
103108 workingDirectory : tests/tests_pytorch
104109 displayName : ' Testing: PyTorch standard'
105110 timeoutInMinutes : " 35"
111+ condition : eq(variables['continue'], '1')
106112
107113 - bash : bash run_standalone_tests.sh
108114 workingDirectory : tests/tests_pytorch
@@ -111,14 +117,7 @@ jobs:
111117 PL_RUN_CUDA_TESTS : " 1"
112118 displayName : ' Testing: PyTorch standalone tests'
113119 timeoutInMinutes : " 35"
114-
115- - bash : bash run_standalone_tasks.sh
116- workingDirectory : tests/tests_pytorch
117- env :
118- PL_USE_MOCKED_MNIST : " 1"
119- PL_RUN_CUDA_TESTS : " 1"
120- displayName : ' Testing: PyTorch standalone tasks'
121- timeoutInMinutes : " 10"
120+ condition : eq(variables['continue'], '1')
122121
123122 - bash : |
124123 python -m coverage report
@@ -128,13 +127,14 @@ jobs:
128127 ls -l
129128 workingDirectory: tests/tests_pytorch
130129 displayName: 'Statistics'
130+ condition: eq(variables['continue'], '1')
131131
132132 - task : PublishTestResults@2
133133 displayName : ' Publish test results'
134134 inputs :
135135 testResultsFiles : ' $(Build.StagingDirectory)/test-results.xml'
136136 testRunTitle : ' $(Agent.OS) - $(Build.DefinitionName) - Python $(python.version)'
137- condition : succeededOrFailed()
137+ condition : and( succeededOrFailed(), eq(variables['continue'], '1') )
138138
139139 - script : |
140140 set -e
@@ -146,9 +146,11 @@ jobs:
146146 env:
147147 PL_USE_MOCKED_MNIST: "1"
148148 displayName: 'Testing: PyTorch examples'
149+ condition: eq(variables['continue'], '1')
149150
150151 - bash : python -m pytest benchmarks -v --maxfail=2 --durations=0
151152 workingDirectory : tests/tests_pytorch
152153 env :
153154 PL_RUN_CUDA_TESTS : " 1"
154155 displayName : ' Testing: PyTorch benchmarks'
156+ condition : eq(variables['continue'], '1')
0 commit comments