Skip to content

OnnxTransform: Fix 3 bugbash bugs #1080

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

Merged
merged 4 commits into from
Sep 28, 2018
Merged

Conversation

shmoradims
Copy link

Fixes #1050 #1051 #1053

@dnfclas
Copy link

dnfclas commented Sep 27, 2018

CLA assistant check
All CLA requirements met. #Resolved

@Ivanidzo4ka
Copy link
Contributor

Ivanidzo4ka commented Sep 27, 2018

using Microsoft.ML.Runtime;

add header. #Resolved


Refers to: src/Microsoft.ML.OnnxTransform/OnnxUtils.cs:1 in 6ffbc62. [](commit_id = 6ffbc62, deletion_comment = False)

Input = args.InputColumn;
Output = args.OutputColumn;

var outputNodeInfo = Model.GetOutputsInfo().Where(x => x.Name == args.OutputColumn).First();
var outputNodeInfo = Model.ModelInfo.OutputsInfo[0];
Copy link
Contributor

@Ivanidzo4ka Ivanidzo4ka Sep 27, 2018

Choose a reason for hiding this comment

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

ar outputNodeInfo = Model.ModelInfo.OutputsInfo[0]; [](start = 13, length = 51)

Why you made this change? Why you make this restriction on output column? #Closed

Copy link
Author

Choose a reason for hiding this comment

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

I removed the restriction. Now the onnx_model input/output node names don't matter, b/c there's only 1 input and 1 output. We just tie them to whatever IDV column is specified as input/output, w/o forcing the names to match.


In reply to: 221091553 [](ancestors = 221091553)

Copy link
Contributor

Choose a reason for hiding this comment

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

How many models out there have only one input and one output? By imposing this restriction you denied any model which not suite this criteria.
What if user want's output from hidden layer in DNN, or some layer which is not last one in execution graph?

If problem with output node's names, why can you accept two strings for input and output, one as IDV column name, and other as ONNX name?


In reply to: 221109171 [](ancestors = 221109171,221091553)

Copy link
Contributor

@jignparm jignparm Sep 28, 2018

Choose a reason for hiding this comment

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

In Tensorflow, there are many examples of models with multiple inputs and outputs. But for Onnx , all the models in the zoo (see https://github.com/onnx/models) have exactly 1 in/output. . We can probably add support for multiple input/outputs as part of ML.net v0.7, to make it future proof, but currently this should cover 100% of all existing pretrained Onnx 1.2 models.

The change above gives more flexibility on how the user wants to name the IDV output column (i.e. it doesn't have to be same name as model)


In reply to: 221112683 [](ancestors = 221112683,221109171,221091553)

Copy link
Contributor

Choose a reason for hiding this comment

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

@wschin please review this.

Copy link
Contributor

@TomFinley TomFinley Sep 28, 2018

Choose a reason for hiding this comment

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

Sorry, do we disagree with @Ivanidzo4ka's proposal? It seems quite sensible to me. You have an output column name in IDV land, but what it corresponds to in tensorflow land is incidental.

As it happens, Ivan's design also makes it possible to make a well written pigstention, which currently is quite difficult under the current rather inflexible design. #Closed

Copy link
Author

Choose a reason for hiding this comment

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

We resolved this after the scrum today with Ivan, Pete, Jignesh, Yael.

Conclusion: No change is needed.

Summary: B/c sonoma API only allows access to inputs and outputs (not intermediate layers), and all the onnx models in model zoo have just 1 input and 1 output, we can keep OnnxTransform API as is.


In reply to: 221142181 [](ancestors = 221142181)

@shmoradims
Copy link
Author

using Microsoft.ML.Runtime;

Added


In reply to: 425256598 [](ancestors = 425256598)


Refers to: src/Microsoft.ML.OnnxTransform/OnnxUtils.cs:1 in 6ffbc62. [](commit_id = 6ffbc62, deletion_comment = False)

Copy link
Contributor

@Ivanidzo4ka Ivanidzo4ka left a comment

Choose a reason for hiding this comment

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

:shipit:

@shmoradims shmoradims merged commit 8592d96 into dotnet:master Sep 28, 2018
@shmoradims shmoradims deleted the onnx_bugbash branch September 28, 2018 03:10
@shauheen
Copy link
Contributor

shauheen commented Sep 28, 2018

@shmoradims please use the correct notation when associating with multiple issues. #Resolved

@shmoradims
Copy link
Author

sure


In reply to: 425318353 [](ancestors = 425318353)

@ghost ghost locked as resolved and limited conversation to collaborators Mar 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants