-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Using OnnxTransformer throws TypeInitializationException #5262
Copy link
Copy link
Closed
Labels
Awaiting User InputAwaiting author to supply further info (data, model, repro). Will close issue if no more info given.Awaiting author to supply further info (data, model, repro). Will close issue if no more info given.P3Doc bugs, questions, minor issues, etc.Doc bugs, questions, minor issues, etc.documentationRelated to documentation of ML.NETRelated to documentation of ML.NETquestionFurther information is requestedFurther information is requested
Metadata
Metadata
Assignees
Labels
Awaiting User InputAwaiting author to supply further info (data, model, repro). Will close issue if no more info given.Awaiting author to supply further info (data, model, repro). Will close issue if no more info given.P3Doc bugs, questions, minor issues, etc.Doc bugs, questions, minor issues, etc.documentationRelated to documentation of ML.NETRelated to documentation of ML.NETquestionFurther information is requestedFurther information is requested
Type
Fields
Give feedbackNo fields configured for issues without a type.
System information
Issue
When trying to use OnnxTransformer, the native libraries aren't loaded properly. I can see them under bin\Debug\netcoreapp3.1\runtimes(platform)\native.
If I use package version 1.4.0 of OnnxTransformer, without installing the runtime myself, it works.
I couldn't find any docs regarding the requirement to install the runtime manually (I figured it out by browsing all over the place, but not through docs really). I suppose this should be clear when you're not using the onnxruntime package explicitly, but rather the higher level API of OnnxTransformer?
On a separate note: Is it sufficient to install the GPU natives and use the
fallbackToCpuflag ofApplyOnnxModelto be able to run inferencing on both CPU and GPU? I'm having a hard time finding this documented.What did you do?
Installed
Microsoft.ML.OnnxTransformer1.5.0 andMicrosoft.ML.OnnxRuntime1.3.0 and usedApplyOnnxModelin a pipeline.What happened?
Calling
ApplyOnnxModelthrowsSystem.TypeInitializationException.What did you expect?
That my ONNX model can be used.
Source code / logs
Inner exception message:
"Unable to load DLL 'onnxruntime' or one of its dependencies: The specified module could not be found. (0x8007007E)"