-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add a sample for Onnx conversion #5195
Conversation
docs/samples/Microsoft.ML.Samples/Dynamic/ModelOperations/OnnxConversion.cs
Show resolved
Hide resolved
docs/samples/Microsoft.ML.Samples/Dynamic/ModelOperations/OnnxConversion.cs
Outdated
Show resolved
Hide resolved
docs/samples/Microsoft.ML.Samples/Dynamic/ModelOperations/OnnxConversion.cs
Outdated
Show resolved
Hide resolved
docs/samples/Microsoft.ML.Samples/Dynamic/ModelOperations/OnnxConversion.cs
Outdated
Show resolved
Hide resolved
docs/samples/Microsoft.ML.Samples/Dynamic/ModelOperations/OnnxConversion.cs
Outdated
Show resolved
Hide resolved
docs/samples/Microsoft.ML.Samples/Dynamic/ModelOperations/OnnxConversion.cs
Outdated
Show resolved
Hide resolved
docs/samples/Microsoft.ML.Samples/Dynamic/ModelOperations/OnnxConversion.cs
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #5195 +/- ##
=======================================
Coverage 73.31% 73.32%
=======================================
Files 1007 1007
Lines 188075 188124 +49
Branches 20244 20246 +2
=======================================
+ Hits 137892 137934 +42
- Misses 44658 44661 +3
- Partials 5525 5529 +4
|
docs/samples/Microsoft.ML.Samples/Dynamic/ModelOperations/OnnxConversion.cs
Show resolved
Hide resolved
} | ||
|
||
public static void Example() | ||
{ |
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 think this sample is getting more complicated than necessary. Can we simplify it just to demonstrate basic Onnx export and exporting to a different opset? The scenarios of using the whole pipeline versus partial pipeline is more advanced and can be left out of this sample. #Resolved
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.
{ | ||
// Create data featurizing pipeline | ||
var pipeline = mlContext.Transforms.CopyColumns("Label", "IsOver50K") | ||
// Convert categorical features to one-hot vectors |
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.
Do you still need these changes? #Resolved
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.
yes, because the input data for the pipeline is raw data instead of featurizedData, and the onnx model can only be fed with raw data. So I refactor the SamplesDatasetUtils.cs to have a specific function to get raw data #Resolved
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.
No description provided.