Add a sample for Onnx conversion#5195
Add a sample for Onnx conversion#5195wangyems merged 7 commits intodotnet:masterfrom wangyems:wangye/sample
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.
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.
| { | ||
| // 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.
Do you still need these changes? #Resolved
There was a problem hiding this comment.
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
No description provided.