-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Ensure ONNX export is compatible with Windows RS5 #550
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
Conversation
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.
Thank you for doing this @codemzs ... interesting how they've changed it. 😄 Do we have a handle on this OS X release build?
@@ -719,7 +719,7 @@ protected override bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, ColInfo info, | |||
var node = ctx.CreateNode(opType, srcVariableName, dstVariableName, ctx.GetNodeName(opType)); | |||
node.AddAttribute("classes_strings", terms.DenseValues()); | |||
node.AddAttribute("default_int64", -1); | |||
node.AddAttribute("default_string", DvText.Empty); | |||
node.AddAttribute("default_string", " "); //Temporary fix, since DvText.Empty is not supported by Lotus because it is empty string. |
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.
Please improve the comment here for general audience. #Resolved
@TomFinley OS X release was failing for LR models because I had UseThreads set to true. Thanks for reviewing. |
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.
Looks great. Just please make sure we don't use ZipMap in ML.NET because its output type got changed in ONNX-1.2.
@@ -719,7 +719,10 @@ protected override bool SaveAsOnnxCore(OnnxContext ctx, int iinfo, ColInfo info, | |||
var node = ctx.CreateNode(opType, srcVariableName, dstVariableName, ctx.GetNodeName(opType)); | |||
node.AddAttribute("classes_strings", terms.DenseValues()); | |||
node.AddAttribute("default_int64", -1); | |||
node.AddAttribute("default_string", DvText.Empty); | |||
//default_string needs to be an empty string but there is a BUG in Lotus that |
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.
What is Lotus? Do you mean runtime?
node.AddAttribute("multi_class", true); | ||
node.AddAttribute("coefficients", _weights.SelectMany(w => w.DenseValues())); | ||
node.AddAttribute("intercepts", _biases); | ||
node.AddAttribute("classlabels_strings", _labelNames); | ||
node.AddAttribute("classlabels_ints", Enumerable.Range(0, _numClasses).Select(x => (long)x)); |
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.
LR doesn't output labels (e.g., "A" and "B") anymore?
* remove domain from onnx operators for non-ML types. * Make ONNX compatible with Windows RS5 and add more tests. * PR feedback. * PR feedback. * fix build.
* remove domain from onnx operators for non-ML types. * Make ONNX compatible with Windows RS5 and add more tests. * PR feedback. * PR feedback. * fix build.
fixes #549 by testing ONNX models on Windows RS5 machine.