Skip to content

Commit 1d441f8

Browse files
authored
Re-enable PEP8 check in Win CI build (microsoft#4075)
* Add flake8 to Win CI build so it's re-enabled. It was in the static analysis build that is currently disabled so checks are not running. Fix build.py to be compliant again. Add prefix to flake8 output so it's (hopefully) easier to identify the errors in build output. * Add to all builds in Windows CPU CI so they all fail quickly if there's an issue.
1 parent b85805e commit 1d441f8

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.flake8

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
max-line-length = 120
33
per-file-ignores =
44
__init__.py:F401
5+
format = [flake8 PEP8 ERROR] %(path)s:%(row)d:%(col)d: %(code)s %(text)s

tools/ci_build/build.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1036,11 +1036,13 @@ def run_training_python_frontend_e2e_tests(args, cwd):
10361036
# frontend tests are to be added here:
10371037
log.info("Running python frontend e2e tests.")
10381038

1039-
# with orttraining_run_glue.py.
1039+
# with orttraining_run_glue.py.
10401040
# 1. we like to force to use single GPU (with CUDA_VISIBLE_DEVICES) for fine-tune tests.
10411041
# 2. need to run test separately (not to mix between fp16 and full precision runs. this need to be investigated).
1042-
run_subprocess([sys.executable, 'orttraining_run_glue.py', 'ORTGlueTest.test_bert_with_mrpc', '-v'], cwd=cwd, env={'CUDA_VISIBLE_DEVICES': '0'})
1043-
run_subprocess([sys.executable, 'orttraining_run_glue.py', 'ORTGlueTest.test_bert_fp16_with_mrpc', '-v'], cwd=cwd, env={'CUDA_VISIBLE_DEVICES': '0'})
1042+
run_subprocess([sys.executable, 'orttraining_run_glue.py', 'ORTGlueTest.test_bert_with_mrpc', '-v'],
1043+
cwd=cwd, env={'CUDA_VISIBLE_DEVICES': '0'})
1044+
run_subprocess([sys.executable, 'orttraining_run_glue.py', 'ORTGlueTest.test_bert_fp16_with_mrpc', '-v'],
1045+
cwd=cwd, env={'CUDA_VISIBLE_DEVICES': '0'})
10441046

10451047
run_subprocess([sys.executable, 'orttraining_test_transformers.py'], cwd=cwd)
10461048

tools/ci_build/github/azure-pipelines/win-ci-pipeline.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
workingFolder: '$(Build.BinariesDirectory)'
3939

4040
- script: |
41-
python -m pip install -q pyopenssl setuptools wheel numpy scipy
41+
python -m pip install -q pyopenssl setuptools wheel numpy scipy flake8
4242
workingDirectory: '$(Build.BinariesDirectory)'
4343
displayName: 'Install python modules'
4444
@@ -176,7 +176,7 @@ jobs:
176176
workingFolder: '$(Build.BinariesDirectory)'
177177

178178
- script: |
179-
python -m pip install -q pyopenssl setuptools wheel numpy scipy
179+
python -m pip install -q pyopenssl setuptools wheel numpy scipy flake8
180180
workingDirectory: '$(Build.BinariesDirectory)'
181181
displayName: 'Install python modules'
182182
@@ -304,7 +304,7 @@ jobs:
304304
workingFolder: '$(Build.BinariesDirectory)'
305305

306306
- script: |
307-
python -m pip install -q pyopenssl setuptools wheel numpy scipy
307+
python -m pip install -q pyopenssl setuptools wheel numpy scipy flake8
308308
workingDirectory: '$(Build.BinariesDirectory)'
309309
displayName: 'Install python modules'
310310
@@ -421,7 +421,7 @@ jobs:
421421
workingFolder: '$(Build.BinariesDirectory)'
422422

423423
- script: |
424-
python -m pip install -q pyopenssl setuptools wheel numpy scipy
424+
python -m pip install -q pyopenssl setuptools wheel numpy scipy flake8
425425
workingDirectory: '$(Build.BinariesDirectory)'
426426
displayName: 'Install python modules'
427427

0 commit comments

Comments
 (0)