-
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
Added onnx export support for SelectColumns #4590
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8d8f1b8
Added onnx export support for SelectColumns
harishsk 8b26e17
Deleted file that was added accidentally
harishsk f773b0e
Added doc entry for onnx
harishsk 1b6cb4f
Added custom data transform for OnnxTransform to fix output schema fo…
harishsk 6cc16d9
Backed out earlier changes from RowToRowTransformerBase.cs and OnnxTr…
harishsk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
248 changes: 248 additions & 0 deletions
248
test/BaselineOutput/Common/Onnx/Transforms/SelectColumns.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,248 @@ | ||
{ | ||
"irVersion": "6", | ||
"producerName": "ML.NET", | ||
"producerVersion": "##VERSION##", | ||
"domain": "machinelearning.dotnet", | ||
"graph": { | ||
"node": [ | ||
{ | ||
"input": [ | ||
"Size" | ||
], | ||
"output": [ | ||
"Size0" | ||
], | ||
"name": "Identity", | ||
"opType": "Identity" | ||
}, | ||
{ | ||
"input": [ | ||
"Shape" | ||
], | ||
"output": [ | ||
"Shape0" | ||
], | ||
"name": "Identity0", | ||
"opType": "Identity" | ||
}, | ||
{ | ||
"input": [ | ||
"Thickness" | ||
], | ||
"output": [ | ||
"Thickness0" | ||
], | ||
"name": "Identity1", | ||
"opType": "Identity" | ||
}, | ||
{ | ||
"input": [ | ||
"Label" | ||
], | ||
"output": [ | ||
"Label0" | ||
], | ||
"name": "Identity2", | ||
"opType": "Identity" | ||
}, | ||
{ | ||
"input": [ | ||
"Size0" | ||
], | ||
"output": [ | ||
"Size1" | ||
], | ||
"name": "Identity3", | ||
"opType": "Identity" | ||
}, | ||
{ | ||
"input": [ | ||
"Shape0" | ||
], | ||
"output": [ | ||
"Shape1" | ||
], | ||
"name": "Identity4", | ||
"opType": "Identity" | ||
}, | ||
{ | ||
"input": [ | ||
"Thickness0" | ||
], | ||
"output": [ | ||
"Thickness1" | ||
], | ||
"name": "Identity5", | ||
"opType": "Identity" | ||
}, | ||
{ | ||
"input": [ | ||
"Label0" | ||
], | ||
"output": [ | ||
"Label1" | ||
], | ||
"name": "Identity6", | ||
"opType": "Identity" | ||
} | ||
], | ||
"name": "model", | ||
"input": [ | ||
{ | ||
"name": "Label", | ||
"type": { | ||
"tensorType": { | ||
"elemType": 9, | ||
"shape": { | ||
"dim": [ | ||
{ | ||
"dimValue": "1" | ||
}, | ||
{ | ||
"dimValue": "1" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "Thickness", | ||
"type": { | ||
"tensorType": { | ||
"elemType": 6, | ||
"shape": { | ||
"dim": [ | ||
{ | ||
"dimValue": "1" | ||
}, | ||
{ | ||
"dimValue": "1" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "Size", | ||
"type": { | ||
"tensorType": { | ||
"elemType": 6, | ||
"shape": { | ||
"dim": [ | ||
{ | ||
"dimValue": "1" | ||
}, | ||
{ | ||
"dimValue": "1" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "Shape", | ||
"type": { | ||
"tensorType": { | ||
"elemType": 6, | ||
"shape": { | ||
"dim": [ | ||
{ | ||
"dimValue": "1" | ||
}, | ||
{ | ||
"dimValue": "1" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"output": [ | ||
{ | ||
"name": "Size1", | ||
"type": { | ||
"tensorType": { | ||
"elemType": 6, | ||
"shape": { | ||
"dim": [ | ||
{ | ||
"dimValue": "1" | ||
}, | ||
{ | ||
"dimValue": "1" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "Shape1", | ||
"type": { | ||
"tensorType": { | ||
"elemType": 6, | ||
"shape": { | ||
"dim": [ | ||
{ | ||
"dimValue": "1" | ||
}, | ||
{ | ||
"dimValue": "1" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "Thickness1", | ||
"type": { | ||
"tensorType": { | ||
"elemType": 6, | ||
"shape": { | ||
"dim": [ | ||
{ | ||
"dimValue": "1" | ||
}, | ||
{ | ||
"dimValue": "1" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "Label1", | ||
"type": { | ||
"tensorType": { | ||
"elemType": 9, | ||
"shape": { | ||
"dim": [ | ||
{ | ||
"dimValue": "1" | ||
}, | ||
{ | ||
"dimValue": "1" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"opsetImport": [ | ||
{ | ||
"domain": "ai.onnx.ml", | ||
"version": "2" | ||
}, | ||
{ | ||
"version": "11" | ||
} | ||
] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Where are you dropping remaining columns? #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.
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)