@@ -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 set -e
8281 PACKAGE_NAME: pytorch
8382 FREEZE_REQUIREMENTS: 1
8483 displayName: 'Install dependencies'
85- condition: eq(variables['continue'], '1')
8684
8785 - bash : |
8886 set -e
@@ -91,24 +89,20 @@ jobs:
9189 python requirements/pytorch/check-avail-strategies.py
9290 python requirements/pytorch/check-avail-extras.py
9391 displayName: 'Env details'
94- condition: eq(variables['continue'], '1')
9592
9693 - bash : bash .actions/pull_legacy_checkpoints.sh
9794 displayName : ' Get legacy checkpoints'
98- condition : eq(variables['continue'], '1')
9995
10096 - bash : python -m coverage run --source pytorch_lightning -m pytest
10197 workingDirectory : src/pytorch_lightning
10298 displayName : ' Testing: PyTorch doctests'
103- condition : eq(variables['continue'], '1')
10499
105100 - bash : python -m coverage run --source pytorch_lightning -m pytest --ignore benchmarks -v --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=50
106101 env :
107102 PL_RUN_CUDA_TESTS : " 1"
108103 workingDirectory : tests/tests_pytorch
109104 displayName : ' Testing: PyTorch standard'
110105 timeoutInMinutes : " 35"
111- condition : eq(variables['continue'], '1')
112106
113107 - bash : bash run_standalone_tests.sh
114108 workingDirectory : tests/tests_pytorch
@@ -117,7 +111,14 @@ jobs:
117111 PL_RUN_CUDA_TESTS : " 1"
118112 displayName : ' Testing: PyTorch standalone tests'
119113 timeoutInMinutes : " 35"
120- condition : eq(variables['continue'], '1')
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"
121122
122123 - bash : |
123124 python -m coverage report
@@ -127,14 +128,13 @@ jobs:
127128 ls -l
128129 workingDirectory: tests/tests_pytorch
129130 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 : and( succeededOrFailed(), eq(variables['continue'], '1') )
137+ condition : succeededOrFailed()
138138
139139 - script : |
140140 set -e
@@ -146,11 +146,9 @@ jobs:
146146 env:
147147 PL_USE_MOCKED_MNIST: "1"
148148 displayName: 'Testing: PyTorch examples'
149- condition: eq(variables['continue'], '1')
150149
151150 - bash : python -m pytest benchmarks -v --maxfail=2 --durations=0
152151 workingDirectory : tests/tests_pytorch
153152 env :
154153 PL_RUN_CUDA_TESTS : " 1"
155154 displayName : ' Testing: PyTorch benchmarks'
156- condition : eq(variables['continue'], '1')
0 commit comments