src/Microsoft.ML.OnnxConverter/OnnxMl.md
The machinelearning\src\Microsoft.ML.OnnxConverter\OnnxMl.cs file needs to be updated anytime the IR version is updated in OnnxRuntime, using the steps below:
onnx-ml.proto3 from https://github.com/onnx/onnx/blob/master/onnx/onnx-ml.proto3option csharp_namespace = "Microsoft.ML.Model.OnnxConverter"; to onnx-ml.proto3 right below package ONNX_NAMESPACE;E:\protobuf-csharp-port\lib then run the following in command line to get C# code from the proto file:
protoc.exe -I="E:\protobuf-csharp-port\lib" --csharp_out="E:\protobuf-csharp-port\lib" "E:\protobuf-csharp-port\lib\onnx-ml.proto3"
public with internal in OnnxMl.cs, wrap the root class in OnnxMl.cs with internal class OnnxCSharpToProtoWrapper and append '.OnnxCSharpToProtoWrapper to Microsoft.ML.Model.OnnxConverter namespace prefix whereever there is an error`.The last time the OnnxMl.cs file was updated in ML.NET was November 5, 2019 on PR #4416:
https://github.com/dotnet/machinelearning/pull/4416
It used the onnx-ml.proto3 version of September 16, 2019, updated on this PR which used IR version 6:
As of today, December 11, 2020, the IR is still on version 6, and version 7 hasn't been released yet.