Skip to content

Commit

Permalink
Re-enable PEP8 check in Win CI build (microsoft#4075)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
skottmckay authored May 29, 2020
1 parent b85805e commit 1d441f8
Showing 3 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -2,3 +2,4 @@
max-line-length = 120
per-file-ignores =
__init__.py:F401
format = [flake8 PEP8 ERROR] %(path)s:%(row)d:%(col)d: %(code)s %(text)s
8 changes: 5 additions & 3 deletions tools/ci_build/build.py
Original file line number Diff line number Diff line change
@@ -1036,11 +1036,13 @@ def run_training_python_frontend_e2e_tests(args, cwd):
# frontend tests are to be added here:
log.info("Running python frontend e2e tests.")

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

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

8 changes: 4 additions & 4 deletions tools/ci_build/github/azure-pipelines/win-ci-pipeline.yml
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ jobs:
workingFolder: '$(Build.BinariesDirectory)'

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

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

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

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

0 comments on commit 1d441f8

Please sign in to comment.