Skip to content

Commit dc6155b

Browse files
authored
Make changes to fix nightly tests issue. (#2227)
Signed-off-by: Jay Zhang <[email protected]>
1 parent b2dd69f commit dc6155b

File tree

4 files changed

+24
-26
lines changed

4 files changed

+24
-26
lines changed

ci_build/azure_pipelines/keras2onnx_application_tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
python.version: '3.9'
2626
ONNX_PATH: onnx==1.14.1
2727
INSTALL_KERAS:
28-
UNINSTALL_KERAS: pip uninstall keras -y
28+
UNINSTALL_KERAS:
2929
INSTALL_TENSORFLOW: pip install tensorflow==2.12.0
3030
INSTALL_ORT: pip install onnxruntime==1.15.0
3131
INSTALL_KERAS_RESNET: pip install keras-resnet
@@ -97,9 +97,9 @@ jobs:
9797
python.version: '3.9'
9898
ONNX_PATH: onnx==1.14.1
9999
INSTALL_KERAS:
100-
UNINSTALL_KERAS: pip uninstall keras -y
100+
UNINSTALL_KERAS:
101101
INSTALL_TENSORFLOW: pip install tensorflow==2.12.0
102-
INSTALL_ORT: pip install onnxruntime==1.15.0
102+
INSTALL_ORT: pip install onnxruntime==1.15.1
103103
INSTALL_KERAS_RESNET: pip install keras-resnet
104104
INSTALL_TRANSFORMERS: pip install transformers==3.4.0
105105
INSTALL_NUMPY: pip install numpy==1.19.0
@@ -111,7 +111,7 @@ jobs:
111111
INSTALL_KERAS:
112112
UNINSTALL_KERAS:
113113
INSTALL_TENSORFLOW: pip install tensorflow==2.11.0
114-
INSTALL_ORT: pip install onnxruntime==1.15.0
114+
INSTALL_ORT: pip install onnxruntime==1.15.1
115115
INSTALL_KERAS_RESNET: pip install keras-resnet
116116
INSTALL_TRANSFORMERS: pip install transformers==3.4.0
117117
INSTALL_NUMPY:
@@ -123,7 +123,7 @@ jobs:
123123
INSTALL_KERAS:
124124
UNINSTALL_KERAS:
125125
INSTALL_TENSORFLOW: pip install tensorflow==2.10.0
126-
INSTALL_ORT: pip install onnxruntime==1.15.0
126+
INSTALL_ORT: pip install onnxruntime==1.15.1
127127
INSTALL_KERAS_RESNET: pip install keras-resnet
128128
INSTALL_TRANSFORMERS: pip install transformers==4.12.0
129129
INSTALL_NUMPY:

ci_build/azure_pipelines/templates/setup.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,6 @@ steps:
1414
else
1515
pip install $(CI_PIP_ONNX_BACKEND_NAME) numpy==1.23.4
1616
fi
17-
# TF 1.10 requires numpy <=1.14.5 and >=1.13.3, but onnxruntime 0.2.1 does not work with numpy <= 1.14.5
18-
# Upgrade numpy only within constraints from other packages if any.
19-
if [[ $CI_TF_VERSION == 1.10* ]] && [[ $CI_ONNX_BACKEND == "onnxruntime" ]] ;
20-
then
21-
pip install $(CI_PIP_ONNX_NAME) $(CI_PIP_ONNX_BACKEND_NAME) numpy --no-deps -U
22-
fi
23-
24-
if [[ $CI_ONNXRUNTIME_NIGHTLY == "true" ]] ;
25-
then
26-
pip uninstall -y onnxruntime
27-
# install numpy upfront since it is not on https://test.pypi.org/simple/
28-
pip install 'numpy>=1.18'
29-
pip install -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ ort-nightly
30-
fi
3117
3218
if [[ $CI_SKIP_TFJS_TESTS == "False" ]] ;
3319
then
@@ -37,12 +23,7 @@ steps:
3723
3824
if [[ $CI_TF_VERSION == 2.* ]] ;
3925
then
40-
# onnxruntime-extensions is not supported Python 3.10 so far.
41-
# https://github.com/microsoft/onnxruntime-extensions/issues/273
42-
if [[ $CI_PYTHON_VERSION != 3.10 ]] ;
43-
then
44-
pip install onnxruntime-extensions==0.3.1
45-
fi
26+
pip install onnxruntime-extensions==0.3.1
4627
if [[ $CI_TF_VERSION == 2.3* ]] ;
4728
then
4829
pip install tensorflow-text==${CI_TF_VERSION}
@@ -84,6 +65,14 @@ steps:
8465
fi
8566
fi
8667
68+
if [[ $CI_ONNXRUNTIME_NIGHTLY == "true" ]] ;
69+
then
70+
pip uninstall -y onnxruntime
71+
# install numpy upfront since it is not on https://test.pypi.org/simple/
72+
pip install 'numpy>=1.18'
73+
pip install -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ ort-nightly
74+
fi
75+
8776
pip uninstall -y protobuf
8877
pip install "protobuf~=3.20"
8978

ci_build/azure_pipelines/unit_test-matrix.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,11 @@ stages:
6060
report_coverage: 'True'
6161

6262
- template: 'templates/combine_test_coverage.yml'
63+
64+
schedules:
65+
- cron: "0 10 * * *"
66+
displayName: Daily nightly Unit Test, full matrix.
67+
branches:
68+
include:
69+
- main
70+
always: true

tests/test_einsum_helper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ def assert_raise(self, fct, exc_type):
2525
raise AssertionError("%r was not raised." % exc_type)
2626

2727
def apply_einsum_sequence(self, seq, *inputs):
28+
providers = ['CPUExecutionProvider']
2829
names = ["X%d" % i for i in range(len(inputs))]
2930
onx = seq.to_onnx('Y', *names, opset=self.config.opset)
30-
sess = InferenceSession(onx.SerializeToString())
31+
sess = InferenceSession(onx.SerializeToString(), providers=providers)
3132
inps = {n: i.astype(np.float32) for n, i in zip(names, inputs)}
3233
res = sess.run(None, inps)
3334
return res[0]

0 commit comments

Comments
 (0)