Skip to content

Commit d07c1e2

Browse files
authored
Merge pull request #462 from nbcsm/ci
update CI
2 parents e36c242 + be91175 commit d07c1e2

10 files changed

+104
-58
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ For pytorch/caffe2, follow the instructions here:
4141
We tested with pytorch/caffe2 and onnxruntime and unit tests are passing for those.
4242

4343
## Supported Tensorflow and Python Versions
44-
We tested with tensorflow 1.5-1.12 and anaconda **3.5,3.6**.
44+
We tested with tensorflow 1.5-1.13 and anaconda **3.5,3.6**.
4545

4646
# Installation
4747
## From pypi
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
# Test against latest onnxruntime nightly package
22

3-
# TODO: change onnxruntime package name when nightly package is ready
4-
53
jobs:
64
- template: 'templates/job_generator.yml'
75
parameters:
8-
tf_versions: ['1.12']
9-
onnx_opsets: ['9']
6+
tf_versions: ['1.13.1']
107
onnx_backends:
118
onnxruntime: ['']
129
job:
13-
displayName: 'unit_test'
1410
steps:
1511
- template: 'unit_test.yml'
12+
parameters:
13+
onnx_opsets: ['10', '9', '8', '7']

ci_build/azure_pipelines/pretrained_model_test-matrix.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ jobs:
44
- template: 'templates/job_generator.yml'
55
parameters:
66
platforms: ['linux', 'windows', 'mac']
7-
tf_versions: ['1.12', '1.11', '1.10', '1.9', '1.8', '1.7', '1.6', '1.5']
7+
python_versions: ['3.6', '3.5']
8+
tf_versions: ['1.13.1', '1.12', '1.11', '1.10', '1.9', '1.8', '1.7', '1.6', '1.5']
89
onnx_opsets: ['9', '8', '7']
9-
onnx_backends:
10-
onnxruntime: ['0.3.0']
1110
job:
1211
steps:
1312
- template: 'pretrained_model_test.yml'

ci_build/azure_pipelines/pretrained_model_test.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,18 @@
33
jobs:
44
- template: 'templates/job_generator.yml'
55
parameters:
6-
tf_versions: ['1.12']
6+
python_versions: ['3.6', '3.5']
7+
tf_versions: ['1.13.1']
8+
onnx_opsets: ['9', '8', '7']
9+
job:
10+
steps:
11+
- template: 'pretrained_model_test.yml'
12+
13+
- template: 'templates/job_generator.yml'
14+
parameters:
15+
platforms: ['windows', 'mac']
16+
tf_versions: ['1.13.1']
717
onnx_opsets: ['9', '8', '7']
8-
onnx_backends:
9-
onnxruntime: ['0.3.0']
1018
job:
1119
steps:
1220
- template: 'pretrained_model_test.yml'

ci_build/azure_pipelines/templates/job_generator.yml

Lines changed: 50 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ parameters:
66
tf_versions: ['']
77
onnx_versions: ['']
88
onnx_opsets: ['']
9-
onnx_backends: {onnxruntime: ['']}
9+
onnx_backends: {onnxruntime: ['0.3.0']}
1010
job: {}
1111
run_setup: 'True'
1212

@@ -27,31 +27,55 @@ jobs:
2727
${{ each python_version in parameters.python_versions }}:
2828
${{ each tf_version in parameters.tf_versions }}:
2929
${{ each onnx_version in parameters.onnx_versions }}:
30-
${{ each onnx_opset in parameters.onnx_opsets }}:
31-
${{ each onnx_backend in parameters.onnx_backends }}:
32-
${{ each onnx_backend_version in onnx_backend.value }}:
33-
${{ format('{0} python{1} tf{2} onnx{3} opset{4} {5}{6}', platform, python_version, tf_version, onnx_version, onnx_opset, onnx_backend.key, onnx_backend_version) }}:
34-
CI_PYTHON_VERSION: '${{ python_version }}'
35-
CI_TF_VERSION: '${{ tf_version }}'
36-
CI_ONNX_VERSION: '${{ onnx_version }}'
37-
CI_ONNX_OPSET: '${{ onnx_opset }}'
38-
CI_ONNX_BACKEND: '${{ onnx_backend.key }}'
39-
CI_ONNX_BACKEND_VERSION: '${{ onnx_backend_version }}'
40-
41-
${{ if eq(tf_version, '') }}:
42-
CI_PIP_TF_NAME: 'tensorflow'
43-
${{ if ne(tf_version, '') }}:
44-
CI_PIP_TF_NAME: ${{ format('tensorflow=={0}', tf_version) }}
45-
46-
${{ if eq(onnx_version, '') }}:
47-
CI_PIP_ONNX_NAME: 'onnx'
48-
${{ if ne(onnx_version, '') }}:
49-
CI_PIP_ONNX_NAME: ${{ format('onnx=={0}', onnx_version) }}
50-
51-
${{ if eq(onnx_backend_version, '') }}:
52-
CI_PIP_ONNX_BACKEND_NAME: '${{ onnx_backend.key }}'
53-
${{ if ne(onnx_backend_version, '') }}:
54-
CI_PIP_ONNX_BACKEND_NAME: ${{ format('{0}=={1}', onnx_backend.key, onnx_backend_version) }}
30+
${{ each onnx_backend in parameters.onnx_backends }}:
31+
${{ each onnx_backend_version in onnx_backend.value }}:
32+
${{ each onnx_opset in parameters.onnx_opsets }}:
33+
${{ if ne(onnx_opset, '') }}:
34+
${{ format('{0} python{1} tf{2} onnx{3} opset{4} {5}{6}', platform, python_version, tf_version, onnx_version, onnx_opset, onnx_backend.key, onnx_backend_version) }}:
35+
CI_PYTHON_VERSION: '${{ python_version }}'
36+
CI_TF_VERSION: '${{ tf_version }}'
37+
CI_ONNX_VERSION: '${{ onnx_version }}'
38+
CI_ONNX_OPSET: '${{ onnx_opset }}'
39+
CI_ONNX_BACKEND: '${{ onnx_backend.key }}'
40+
CI_ONNX_BACKEND_VERSION: '${{ onnx_backend_version }}'
41+
42+
${{ if eq(tf_version, '') }}:
43+
CI_PIP_TF_NAME: 'tensorflow'
44+
${{ if ne(tf_version, '') }}:
45+
CI_PIP_TF_NAME: ${{ format('tensorflow=={0}', tf_version) }}
46+
47+
${{ if eq(onnx_version, '') }}:
48+
CI_PIP_ONNX_NAME: 'onnx'
49+
${{ if ne(onnx_version, '') }}:
50+
CI_PIP_ONNX_NAME: ${{ format('onnx=={0}', onnx_version) }}
51+
52+
${{ if eq(onnx_backend_version, '') }}:
53+
CI_PIP_ONNX_BACKEND_NAME: '${{ onnx_backend.key }}'
54+
${{ if ne(onnx_backend_version, '') }}:
55+
CI_PIP_ONNX_BACKEND_NAME: ${{ format('{0}=={1}', onnx_backend.key, onnx_backend_version) }}
56+
57+
${{ if eq(onnx_opset, '') }}:
58+
${{ format('{0} python{1} tf{2} onnx{3} {4}{5}', platform, python_version, tf_version, onnx_version, onnx_backend.key, onnx_backend_version) }}:
59+
CI_PYTHON_VERSION: '${{ python_version }}'
60+
CI_TF_VERSION: '${{ tf_version }}'
61+
CI_ONNX_VERSION: '${{ onnx_version }}'
62+
CI_ONNX_BACKEND: '${{ onnx_backend.key }}'
63+
CI_ONNX_BACKEND_VERSION: '${{ onnx_backend_version }}'
64+
65+
${{ if eq(tf_version, '') }}:
66+
CI_PIP_TF_NAME: 'tensorflow'
67+
${{ if ne(tf_version, '') }}:
68+
CI_PIP_TF_NAME: ${{ format('tensorflow=={0}', tf_version) }}
69+
70+
${{ if eq(onnx_version, '') }}:
71+
CI_PIP_ONNX_NAME: 'onnx'
72+
${{ if ne(onnx_version, '') }}:
73+
CI_PIP_ONNX_NAME: ${{ format('onnx=={0}', onnx_version) }}
74+
75+
${{ if eq(onnx_backend_version, '') }}:
76+
CI_PIP_ONNX_BACKEND_NAME: '${{ onnx_backend.key }}'
77+
${{ if ne(onnx_backend_version, '') }}:
78+
CI_PIP_ONNX_BACKEND_NAME: ${{ format('{0}=={1}', onnx_backend.key, onnx_backend_version) }}
5579

5680
# Insert all properties other than pool/steps/strategy
5781
${{ each pair in parameters.job }}:

ci_build/azure_pipelines/templates/pretrained_model_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ steps:
55
set -x
66
status=0
77
# TODO: fix unity model path
8-
# python tests/run_pretrained_models.py --backend $(CI_ONNX_BACKEND) --opset $(CI_ONNX_OPSET) --config tests/unity.yaml || status=$?
9-
python tests/run_pretrained_models.py --backend $(CI_ONNX_BACKEND) --opset $(CI_ONNX_OPSET) --config tests/run_pretrained_models.yaml || status=$?
8+
# python tests/run_pretrained_models.py --backend $CI_ONNX_BACKEND --opset $CI_ONNX_OPSET --config tests/unity.yaml || status=$?
9+
python tests/run_pretrained_models.py --backend $CI_ONNX_BACKEND --opset $CI_ONNX_OPSET --config tests/run_pretrained_models.yaml || status=$?
1010
exit $status
1111
displayName: 'Test Pre-trained Model'

ci_build/azure_pipelines/templates/setup.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ steps:
1313
pip install $(CI_PIP_ONNX_NAME) $(CI_PIP_ONNX_BACKEND_NAME) numpy --no-deps -U
1414
fi
1515
16-
# HACK: before onnxruntime nightly package is ready, install onnxruntime from pypi test
17-
if [[ $CI_ONNXRUNTIME_FROM_PYPI_TEST == "true" ]] ;
16+
if [[ $CI_ONNXRUNTIME_NIGHTLY == "true" ]] ;
1817
then
19-
pip install --index-url https://test.pypi.org/simple/ onnxruntime --force-reinstall
18+
pip install --index-url https://test.pypi.org/simple/ ort-nightly --force-reinstall
2019
fi
2120
2221
python setup.py install
@@ -31,7 +30,7 @@ steps:
3130
- bash: |
3231
site_dir=$(python -c "import site; print(site.getsitepackages()[1])")
3332
echo "##vso[task.prependpath]$site_dir\numpy\.libs"
34-
displayName: 'Fix numpy path'
33+
displayName: 'Fix Numpy Path'
3534
condition: and(succeeded(), in(variables['Agent.OS'], 'Windows_NT'))
3635

3736
- bash: env
Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
# Run unit test
22

3+
parameters:
4+
onnx_opsets: ['9', '8', '7']
5+
36
steps:
4-
- bash: |
5-
export TF2ONNX_TEST_BACKEND=$(CI_ONNX_BACKEND)
6-
export TF2ONNX_TEST_OPSET=$(CI_ONNX_OPSET)
7-
python -m pytest --cov=tf2onnx --cov-report=term --disable-pytest-warnings -r s tests
8-
timeoutInMinutes: 5
9-
displayName: 'Run UnitTest'
7+
- ${{ each onnx_opset in parameters.onnx_opsets }}:
8+
- bash: |
9+
export TF2ONNX_TEST_BACKEND=$CI_ONNX_BACKEND
10+
export TF2ONNX_TEST_OPSET=$CI_ONNX_OPSET
11+
python -m pytest --cov=tf2onnx --cov-report=term --disable-pytest-warnings -r s tests
12+
timeoutInMinutes: 5
13+
displayName: ${{ format('Run UnitTest - Opset{0}', onnx_opset) }}
14+
condition: succeededOrFailed()
15+
env:
16+
CI_ONNX_OPSET: '${{ onnx_opset }}'

ci_build/azure_pipelines/unit_test-matrix.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ jobs:
44
- template: 'templates/job_generator.yml'
55
parameters:
66
platforms: ['linux', 'windows', 'mac']
7-
tf_versions: ['1.12', '1.11', '1.10', '1.9', '1.8', '1.7', '1.6', '1.5']
8-
onnx_opsets: ['9', '8', '7']
9-
onnx_backends:
10-
onnxruntime: ['0.3.0']
7+
python_versions: ['3.6', '3.5']
8+
tf_versions: ['1.13.1', '1.12', '1.11', '1.10', '1.9', '1.8', '1.7', '1.6', '1.5']
119
job:
1210
steps:
1311
- template: 'unit_test.yml'

ci_build/azure_pipelines/unit_test.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,23 @@
33
jobs:
44
- template: 'templates/job_generator.yml'
55
parameters:
6-
tf_versions: ['1.12']
7-
onnx_opsets: ['9', '8', '7']
8-
onnx_backends:
9-
onnxruntime: ['0.3.0']
6+
python_versions: ['3.6', '3.5']
7+
tf_versions: ['1.13.1']
8+
job:
9+
steps:
10+
- template: 'unit_test.yml'
11+
12+
- template: 'templates/job_generator.yml'
13+
parameters:
14+
tf_versions: ['1.12', '1.11', '1.10', '1.9', '1.8', '1.7', '1.6', '1.5']
15+
job:
16+
steps:
17+
- template: 'unit_test.yml'
18+
19+
- template: 'templates/job_generator.yml'
20+
parameters:
21+
platforms: ['windows', 'mac']
22+
tf_versions: ['1.13.1']
1023
job:
1124
steps:
1225
- template: 'unit_test.yml'

0 commit comments

Comments
 (0)