-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Updated OnnxScoringEstimator's documentation #4966
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
Conversation
@@ -702,17 +702,17 @@ public NamedOnnxValue GetNamedOnnxValue() | |||
/// | Does this estimator need to look at the data to train its parameters? | No | | |||
/// | 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for changing from "used" to "desired"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// | 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Added a suggestion.
@@ -702,17 +702,17 @@ public NamedOnnxValue GetNamedOnnxValue() | |||
/// | Does this estimator need to look at the data to train its parameters? | No | | |||
/// | 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// | 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) | |
@@ -702,17 +702,17 @@ public NamedOnnxValue GetNamedOnnxValue() | |||
/// | Does this estimator need to look at the data to train its parameters? | No | | |||
/// | 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some minor re-wording
Co-Authored-By: Nat Kershaw (MSFT) <[email protected]>
Co-Authored-By: Nat Kershaw (MSFT) <[email protected]>
Co-Authored-By: Nat Kershaw (MSFT) <[email protected]>
/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