Added onnx export support for SelectColumns#4590
Added onnx export support for SelectColumns#4590harishsk merged 5 commits intodotnet:masterfrom harishsk:selectcolumns
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4590 +/- ##
==========================================
- Coverage 75.78% 75.14% -0.65%
==========================================
Files 944 913 -31
Lines 171156 160909 -10247
Branches 18468 17307 -1161
==========================================
- Hits 129715 120918 -8797
+ Misses 36316 35143 -1173
+ Partials 5125 4848 -277
|
| CompareSelectedScalarColumns<int>("Shape", "Shape1", transformedData, onnxResult); | ||
| CompareSelectedScalarColumns<int>("Thickness", "Thickness1", transformedData, onnxResult); | ||
| CompareSelectedScalarColumns<bool>("Label", "Label1", transformedData, onnxResult); | ||
| } |
There was a problem hiding this comment.
for linux/centos platforms where ORT is not supported can we have a baseline test to compare against? #Resolved
There was a problem hiding this comment.
| var dstVariable = ctx.AddIntermediateVariable(dstCol.Type, dstCol.Name, true); | ||
| string opType = "Identity"; | ||
| ctx.CreateNode(opType, srcVariable, dstVariable, ctx.GetNodeName(opType), ""); | ||
| } |
There was a problem hiding this comment.
Where are you dropping remaining columns? #Resolved
There was a problem hiding this comment.
By default, only the columns that have connections are selected. So the columns not in the OutputToInputMap are automatically dropped.
But your comment made me look deeper into the output schema. I have fixed the output schema with an updated to OnnxTransformer.
In reply to: 361511119 [](ancestors = 361511119)
| CompareSelectedScalarColumns<int>("Size", "Size1", transformedData, onnxResult); | ||
| CompareSelectedScalarColumns<int>("Shape", "Shape1", transformedData, onnxResult); | ||
| CompareSelectedScalarColumns<int>("Thickness", "Thickness1", transformedData, onnxResult); | ||
| CompareSelectedScalarColumns<bool>("Label", "Label1", transformedData, onnxResult); |
There was a problem hiding this comment.
I think we want to make sure the columns you have not selected are not present in the output schema anymore, that is the point of select column transform. #Resolved
There was a problem hiding this comment.
Fixed to verify that the output schema contains only the selected columns
In reply to: 361511408 [](ancestors = 361511408)
…ansform.cs and updated OnnxContext to include a facility to remove input variables
Implemented ability to export ColumnSelectingEstimator to onnx.