Skip to content

Fixed bugs in OptionalColumnTransform and added bool support - #4815

Merged
harishsk merged 2 commits into
dotnet:masterfrom
harishsk:optionalCol
Feb 10, 2020
Merged

harishsk merged 2 commits into
dotnet:masterfrom
harishsk:optionalCol

Conversation

@harishsk

@harishsk harishsk commented Feb 8, 2020

Copy link
Copy Markdown
Contributor

OptionalColumnTransform didn't have support for boolean initializers. When I went to add that I saw that the TensorProto data was being set incorrectly for a few other data types. I tried to fix that and I had to redo the AddInitializer functionality in OnnxContext and related plumbing in OnnxUtils.cs.
Then when I went to add tests for all the data types that are now supported in OptionalColumnTransform, I realized I needed to simplify the column comparison in OnnxConversionTest. In the process I also added support SByte and Byte in OnnxUtils - CreateNamedValue and fixed up the corresponding tests.

In summary:

  • Cleaned up OnnxContext's initializer interface
  • Cleaned up column comparison functionality on OnnxConversionTest
  • Fixed bugs in OptionalColumnTransform's onnx export and added support for boolean initializers

- Cleaned up column comparison functionality on OnnxConversionTest
- Fixed bugs in OptionalColumnTransform's onnx export and added support for boolean initializers
@harishsk
harishsk requested a review from a team as a code owner February 8, 2020 02:22

/// <summary>
/// Call this function can declare a global long
/// Call this function to declare a global float

@ganik ganik Feb 10, 2020 •

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.

float [](start = 51, length = 5)

long? #Resolved


/// <summary>
/// Call this function can declare a global string tensor
/// Call this function to declare a global double tensor

@ganik ganik Feb 10, 2020 •

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.

double [](start = 51, length = 6)

ulong? #Resolved

@ganik ganik left a comment

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.

:shipit:


/// <summary>
/// Call this function can declare a global long tensor
/// Call this function to declare a global long tensor

@kere-nel kere-nel Feb 10, 2020 •

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.

This conflicts with the type param description: "Use this for adding array initializers of integer types smaller than Int32" #Resolved

/// </summary>
/// <param name="value">The long number which is going to be added into the ONNX graph</param>
/// <param name="value">The float number which is going to be added</param>
/// <param name="type">The type of integer to be added, e.g. typeof(short). Use this for all integer types smaller than Int32</param>

@kere-nel kere-nel Feb 10, 2020 •

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.

Is the type inclusive of Int32s? #Resolved

Comment thread src/Microsoft.ML.OnnxConverter/OnnxContextImpl.cs
@harishsk
harishsk merged commit a7fa16c into dotnet:master Feb 10, 2020
@harishsk
harishsk deleted the optionalCol branch April 21, 2020 23:59
@ghost ghost locked as resolved and limited conversation to collaborators Mar 19, 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.

3 participants