Updated OnnxScoringEstimator's documentation - #4966
Conversation
| /// | Input column data type | Known-sized vector of <xref:System.Single> or <xref:System.Double> types | | ||
| /// | Output column data type | As specified by the ONNX model | | ||
| /// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.OnnxTransformer (always), Microsoft.ML.OnnxRuntime.Gpu (only if GPU processing is used) | | ||
| /// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.OnnxTransformer (always), either Microsoft.ML.OnnxRuntime 1.2.0 (for CPU processing) or Microsoft.ML.OnnxRuntime.Gpu 1.2.0 (only if GPU processing is desired) | |
There was a problem hiding this comment.
What's the reason for changing from "used" to "desired"?
There was a problem hiding this comment.
I just found it confusing because you can't use GPU processing without the nuget, so you should install it before it is "used".
Do you think it's clearer with 'used'?
There was a problem hiding this comment.
hmm would "available" be a better word? Doesn't ml.net fail if there isn't a GPU, but you try to use the nuget?
There was a problem hiding this comment.
| /// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.OnnxTransformer (always), either Microsoft.ML.OnnxRuntime 1.2.0 (for CPU processing) or Microsoft.ML.OnnxRuntime.Gpu 1.2.0 (only if GPU processing is desired) | | |
| /// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.OnnxTransformer (always), either Microsoft.ML.OnnxRuntime 1.2.0 (for CPU processing) or Microsoft.ML.OnnxRuntime.Gpu 1.2.0 (for GPU processing if GPU is available) | |
There was a problem hiding this comment.
Luis' suggestion is good. Can I clarify what happens if:
a) you install both
b) you install the GPU nuget and you don't don't run with a GPU?
There was a problem hiding this comment.
So I've accepted Luis' suggestion 😄
Regarding your questions, @natke
a) I hadn't tested the case of installing both, because I was told by @harishsk that users should install only one. I have just made a quick test installing both on my laptop (without GPU), and it doesn't throw any errors when running, so I guess it is simply using the non-GPU nuget. I am having some troubles using my remote GPU computer, so I haven't had the chance to test it there.
b) If I install the GPU nuget on a computer without GPU, the following error is thrown when running the code:
System.TypeInitializationException : The type initializer for 'Microsoft.ML.OnnxRuntime.NativeMethods' threw an exception.
---- System.DllNotFoundException : Unable to load DLL 'onnxruntime' or one of its dependencies: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Reason for this is that the onnxruntime DLL has a dependency on CUDA and CuDNN, so if those aren't installed, it can't load onnxruntime either.
There was a problem hiding this comment.
I have tested this now on my remote GPU. And when installing both nugets, the GPU nuget gets ignored when running a sample code, it throws the exception that is expected when trying to use the GPU feature without the GPU nuget:
Unable to find an entry point named 'OrtSessionOptionsAppendExecutionProvider_CUDA' in DLL 'onnxruntime'
So in general it seems that when installing both nugets, the GPU one gets completely ignored.
… support is required
luisquintanilla
left a comment
There was a problem hiding this comment.
Looks good. Added a suggestion.
| /// | Input column data type | Known-sized vector of <xref:System.Single> or <xref:System.Double> types | | ||
| /// | Output column data type | As specified by the ONNX model | | ||
| /// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.OnnxTransformer (always), Microsoft.ML.OnnxRuntime.Gpu (only if GPU processing is used) | | ||
| /// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.OnnxTransformer (always), either Microsoft.ML.OnnxRuntime 1.2.0 (for CPU processing) or Microsoft.ML.OnnxRuntime.Gpu 1.2.0 (only if GPU processing is desired) | |
There was a problem hiding this comment.
| /// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.OnnxTransformer (always), either Microsoft.ML.OnnxRuntime 1.2.0 (for CPU processing) or Microsoft.ML.OnnxRuntime.Gpu 1.2.0 (only if GPU processing is desired) | | |
| /// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.OnnxTransformer (always), either Microsoft.ML.OnnxRuntime 1.2.0 (for CPU processing) or Microsoft.ML.OnnxRuntime.Gpu 1.2.0 (for GPU processing if GPU is available) | |
| /// | Input column data type | Known-sized vector of <xref:System.Single> or <xref:System.Double> types | | ||
| /// | Output column data type | As specified by the ONNX model | | ||
| /// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.OnnxTransformer (always), Microsoft.ML.OnnxRuntime.Gpu (only if GPU processing is used) | | ||
| /// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.OnnxTransformer (always), either Microsoft.ML.OnnxRuntime 1.2.0 (for CPU processing) or Microsoft.ML.OnnxRuntime.Gpu 1.2.0 (only if GPU processing is desired) | |
There was a problem hiding this comment.
Luis' suggestion is good. Can I clarify what happens if:
a) you install both
b) you install the GPU nuget and you don't don't run with a GPU?
Co-Authored-By: Luis Quintanilla <46974588+luisquintanilla@users.noreply.github.com>
natke
left a comment
There was a problem hiding this comment.
Added some minor re-wording
Co-Authored-By: Nat Kershaw (MSFT) <nakersha@microsoft.com>
Co-Authored-By: Nat Kershaw (MSFT) <nakersha@microsoft.com>
Co-Authored-By: Nat Kershaw (MSFT) <nakersha@microsoft.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
PR #4919 changed the way users should work with the Onnxruntime's nugets, now they should include either Onnxruntime or Onnxruntime.Gpu nuget along the OnnxTransformer one.
I also updated a couple of other things that weren't right anymore.
Please, let me know it I should update the docs anywhere else.
Fixes #4872