From 0906c57c9e1ec60adaba2bee115eaf04748dee5e Mon Sep 17 00:00:00 2001 From: Yi Zhang Date: Tue, 26 Mar 2024 17:59:46 +0800 Subject: [PATCH] Pin Onnx Version (#20073) ### Description 1. change in build.py is to fix DML exception (https://dev.azure.com/onnxruntime/onnxruntime/_build?definitionId=10&_a=summary) 2. change in requirements.txt is to fix exception in python packaging pipeline. https://dev.azure.com/aiinfra/Lotus/_build/results?buildId=430433&view=results ### Motivation and Context --------- Co-authored-by: Yi Zhang --- onnxruntime/test/python/requirements.txt | 4 ++-- tools/ci_build/build.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/onnxruntime/test/python/requirements.txt b/onnxruntime/test/python/requirements.txt index e33fe0e4da..dc158e0eeb 100644 --- a/onnxruntime/test/python/requirements.txt +++ b/onnxruntime/test/python/requirements.txt @@ -1,2 +1,2 @@ -onnx -pytest \ No newline at end of file +onnx==1.15.0 +pytest diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index 3c1bdfc54c..e1649ae251 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -2087,7 +2087,9 @@ def run_onnxruntime_tests(args, source_dir, ctest_path, build_dir, configs): run_subprocess( [sys.executable, "-m", "pip", "uninstall", "--yes", "onnx"], cwd=cwd, dll_path=dll_path ) - run_subprocess([sys.executable, "-m", "pip", "install", "-q", "onnx"], cwd=cwd, dll_path=dll_path) + run_subprocess( + [sys.executable, "-m", "pip", "install", "-q", "onnx==1.15.0"], cwd=cwd, dll_path=dll_path + ) run_subprocess([sys.executable, "onnxruntime_test_python_iobinding.py"], cwd=cwd, dll_path=dll_path) if args.use_cuda: