2022-06-14 22:12:23 +00:00
# How to update ONNX
2019-02-01 22:16:30 +00:00
2022-06-14 22:12:23 +00:00
This note is only for ONNX Runtime developers.
2019-02-01 22:16:30 +00:00
2022-06-14 22:12:23 +00:00
If you need to update the ONNX submodule to a different version, follow the steps below.
1. Update the ONNX submodule
```sh
2019-02-01 22:16:30 +00:00
cd cmake/external/onnx
git remote update
git reset --hard < commit_id >
cd ..
git add onnx
```
(Change the < commit_id > to yours. If you are not sure, use 'origin/master'. Like 'git reset --hard origin/master')
2022-05-31 18:33:36 +00:00
1. Update [cgmanifests/generated/cgmanifest.json ](/cgmanifests/generated/cgmanifest.json ).
2020-05-15 20:34:18 +00:00
This file should be generated. See [cgmanifests/README ](/cgmanifests/README.md ) for instructions.
2019-02-01 22:16:30 +00:00
2022-06-14 22:12:23 +00:00
1. Update [tools/ci_build/github/linux/docker/scripts/requirements.txt ](/tools/ci_build/github/linux/docker/scripts/requirements.txt )
and [tools/ci_build/github/linux/docker/scripts/manylinux/requirements.txt ](/tools/ci_build/github/linux/docker/scripts/manylinux/requirements.txt ).
Update the commit hash for `git+http://github.com/onnx/onnx.git@targetonnxcommithash#egg=onnx` .
2019-02-01 22:16:30 +00:00
2022-06-14 22:12:23 +00:00
1. If there is any change to `cmake/external/onnx/onnx/*.in.proto` , you need to regenerate OnnxMl.cs.
[Building onnxruntime with Nuget ](https://onnxruntime.ai/docs/build/inferencing.html#build-nuget-packages ) will do
this.
2021-08-10 16:36:27 +00:00
2022-06-14 22:12:23 +00:00
1. If you are updating ONNX from a released tag to a new commit, please ask Changming (@snnn) to deploy the new test
data along with other test models to our CI build machines. This is to ensure that our tests cover every ONNX opset.
2019-02-01 22:16:30 +00:00
2022-05-31 18:33:36 +00:00
1. Send you PR, and **manually** queue a build for every packaging pipeline for your branch.
2019-02-01 22:16:30 +00:00
2022-06-14 22:12:23 +00:00
1. If there is a build failure in stage "Check out of dated documents" in WebAssembly CI pipeline, update ONNX Runtime
Web WebGL operator support document:
2021-08-06 22:09:11 +00:00
- Make sure Node.js is installed (see [Prerequisites ](../js/README.md#Prerequisites ) for instructions).
- Follow step 1 in [js/Build ](../js/README.md#Build-2 ) to install dependencies).
- Follow instructions in [Generate document ](../js/README.md#Generating-Document ) to update document. Commit changes applied to file `docs/operators.md` .
2022-06-14 22:12:23 +00:00
1. Usually some newly introduced tests will fail. Then you may need to update
2019-02-01 22:16:30 +00:00
- [onnxruntime/test/onnx/main.cc ](/onnxruntime/test/onnx/main.cc )
2021-08-10 16:36:27 +00:00
- [onnxruntime/test/providers/cpu/model_tests.cc ](/onnxruntime/test/providers/cpu/model_tests.cc )
- [csharp/test/Microsoft.ML.OnnxRuntime.Tests/InferenceTest.cs ](/csharp/test/Microsoft.ML.OnnxRuntime.Tests/InferenceTest.cs )
2020-05-03 02:05:58 +00:00
- [onnxruntime/test/testdata/onnx_backend_test_series_filters.jsonc ](/onnxruntime/test/testdata/onnx_backend_test_series_filters.jsonc )
2022-06-14 22:12:23 +00:00
- [onnxruntime/test/testdata/onnx_backend_test_series_overrides.jsonc ](/onnxruntime/test/testdata/onnx_backend_test_series_overrides.jsonc )