Skip to content
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

Improve error message when defining custom type for variables #5114

Merged
merged 23 commits into from
May 28, 2020
Merged

Improve error message when defining custom type for variables #5114

merged 23 commits into from
May 28, 2020

Conversation

wangyems
Copy link
Member

resolve #4122

The unhelpful message stuff is a bit different from the above link's description. ML.NET throws unhelpful message not because the customer uses the wrong type(different from the type defined in onnx), but defining the variable using the same type as OnnxSequenceType. However, the correct type should be IEnumerable.

This change adds more information to existing exception message and adds a special error message for errors like this when customer carelessly defines a container variable without using container type

@wangyems wangyems requested a review from a team as a code owner May 11, 2020 18:00
@wangyems wangyems requested a review from harishsk May 11, 2020 18:01
@wangyems wangyems requested a review from harishsk May 11, 2020 19:08
@codecov
Copy link

codecov bot commented May 12, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@b74cacc). Click here to learn what that means.
The diff coverage is 0.00%.

@@            Coverage Diff            @@
##             master    #5114   +/-   ##
=========================================
  Coverage          ?   75.56%           
=========================================
  Files             ?      995           
  Lines             ?   179296           
  Branches          ?    19295           
=========================================
  Hits              ?   135488           
  Misses            ?    38544           
  Partials          ?     5264           
Flag Coverage Δ
#Debug 75.56% <0.00%> (?)
#production 71.50% <0.00%> (?)
#test 88.67% <ø> (?)
Impacted Files Coverage Δ
...osoft.ML.Data/DataView/InternalSchemaDefinition.cs 55.40% <0.00%> (ø)
#Resolved

@codecov
Copy link

codecov bot commented May 12, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@a2406f6). Click here to learn what that means.
The diff coverage is 77.20%.

@@            Coverage Diff            @@
##             master    #5114   +/-   ##
=========================================
  Coverage          ?   75.80%           
=========================================
  Files             ?      993           
  Lines             ?   181169           
  Branches          ?    19510           
=========================================
  Hits              ?   137330           
  Misses            ?    38535           
  Partials          ?     5304           
Flag Coverage Δ
#Debug 75.80% <77.20%> (?)
#production 71.70% <75.22%> (?)
#test 88.92% <86.95%> (?)
Impacted Files Coverage Δ
...osoft.ML.Data/DataView/InternalSchemaDefinition.cs 57.43% <50.00%> (ø)
src/Microsoft.ML.Data/Data/SchemaDefinition.cs 73.33% <74.46%> (ø)
src/Microsoft.ML.Data/DataView/TypedCursor.cs 82.53% <78.33%> (ø)
...oft.ML.Tests/OnnxSequenceTypeWithAttributesTest.cs 93.87% <86.95%> (ø)

@antoniovs1029
Copy link
Member

antoniovs1029 commented May 12, 2020

/azp run #Resolved

@azure-pipelines
Copy link

azure-pipelines bot commented May 12, 2020

Azure Pipelines successfully started running 2 pipeline(s).

#Resolved

@wangyems wangyems requested a review from harishsk May 12, 2020 20:55
@wangyems wangyems marked this pull request as draft May 13, 2020 21:03
@wangyems wangyems marked this pull request as ready for review May 14, 2020 01:11
@wangyems wangyems requested a review from harishsk May 27, 2020 18:57
Copy link
Contributor

@harishsk harishsk left a comment

Choose a reason for hiding this comment

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

:shipit:

Copy link
Member

@antoniovs1029 antoniovs1029 left a comment

Choose a reason for hiding this comment

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

I've left some comments. Also, as discussed offline, I think it'd be useful to add a test replicating the original scenario of the original issue, catching the exception, and actually checking that the exception is now the one you've introduced. Thanks 😄

@harishsk harishsk merged commit 65f6c5f into dotnet:master May 28, 2020
@wangyems wangyems deleted the wangye/errormessage branch June 9, 2020 20:19
@ghost ghost locked as resolved and limited conversation to collaborators Mar 18, 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.

Using the wrong type with OnnxSequenceType throws an non-helpful message
3 participants