Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Microsoft.ML.Data/Transforms/KeyToValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -568,9 +568,9 @@ public void SaveAsOnnx(OnnxContext ctx)

if (!ctx.ContainsColumn(inputColumnName))
continue;

string srcVariableName = ctx.GetVariableName(inputColumnName);
var dstVariableName = ctx.AddIntermediateVariable(_types[iinfo], info.outputColumnName, true);
if (!_kvMaps[iinfo].SaveOnnx(ctx, inputColumnName, dstVariableName))
if (!_kvMaps[iinfo].SaveOnnx(ctx, srcVariableName, dstVariableName))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be a good idea to add a test case specifically because we don't have tests for this. Also please verify this fixes the Nimbus issue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I restructured the tests and got rid of a KeyToValue test that seems redundant and is not formatted to test different types of values.

{
ctx.RemoveColumn(inputColumnName, true);
}
Expand Down