Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApplyOnnxModel Transform does not find method after upgrading to ONNXRuntime 1.0.0 #4461

edirgarcia opened this issue Nov 8, 2019 · 1 comment


Copy link

@edirgarcia edirgarcia commented Nov 8, 2019

System information:

  • .NET Version
    Version: 3.0.100
    Commit: 04339c3a26

Runtime Environment:
OS Name: Windows
OS Version: 10.0.18363
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.0.100\

ApplyOnnxModel Transform in 1.4.0 does not find a method after updating OnnxRuntime to 1.0.0

It throws:
Method not found: 'Microsoft.ML.OnnxRuntime.SessionOptions Microsoft.ML.OnnxRuntime.SessionOptions.MakeSessionOptionWithCudaProvider(Int32)'.

Looking at the library on iLSpy it seems that method is actually gone, but ML.NET still asumes is there. It does work when using OnnxRuntime 0.5.1

Stack Trace:
at Microsoft.ML.Transforms.Onnx.OnnxModel..ctor(String modelFile, Nullable1 gpuDeviceId, Boolean fallbackToCpu, Boolean ownModelFile, IDictionary2 shapeDictionary)
at Microsoft.ML.Transforms.Onnx.OnnxTransformer..ctor(IHostEnvironment env, Options options, Byte[] modelBytes) 220
at Microsoft.ML.Transforms.Onnx.OnnxTransformer..ctor(IHostEnvironment env, String[] outputColumnNames, String[] inputColumnNames, String modelFile, Nullable1 gpuDeviceId, Boolean fallbackToCpu, IDictionary2 shapeDictionary)
at Microsoft.ML.OnnxCatalog.ApplyOnnxModel(TransformsCatalog catalog, String outputColumnName, String inputColumnName, String modelFile, Nullable`1 gpuDeviceId, Boolean fallbackToCpu)
at ...TestModelTrainer.Load_Keras_Onnx_Mnist(String modelPath) in D:\Source*\MyProjectPath*\TestModelTrainer.cs:line 756
at Microsoft.PS.Prediction.UnitTests.ML.NET.Tests.MLNetTests.Load_Test_Keras_Onnx_Mnist() in D:\Source*
\MyProjectPath**\ML.NET.Tests.cs:line 165


This comment has been minimized.

Copy link

@edirgarcia edirgarcia commented Nov 8, 2019

It seems that this is a non issue.
ML.NET 1.4.0 ships with OnnxRuntime 0.5.1, and is not expected to work with version 1.0.0.

@edirgarcia edirgarcia closed this Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.