-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Improve exception message and make consistent with ExceptSchemaMismatch #2217
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
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
efedcc3
replaced Except with ExceptSchemMismatch
artidoro c569a62
review comments
artidoro c4623ff
made existing ExceptSchemaMismatch more consistent
artidoro 67fab8d
review comments
artidoro 1b1793d
reverting changes and a few fixes
artidoro e7cc332
rebase fix
artidoro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
some people would get picky about the capitalization :)
Does the exception handler change everything to lowercase? #Pending
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.
I don't think it changes to lowercase.
However, the second argument of
ExceptSchemaMismatch
isstring columnRole
and the message becomes:return $"Could not find {columnRole} column '{columnName}'";
So columnRole only serves the purpose of qualifying "column", while the parameter
columnName
will give the exact name. That's why I have made it lowercase everywhere.In reply to: 250474268 [](ancestors = 250474268)
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.
My preference would be to leave the column names as-is unless we are updating this everywhere (everywhere being any place that we refer to a specific column name.)
In reply to: 250823347 [](ancestors = 250823347,250474268)
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.
The name of the column does not include a space, so the current parameter
columnRole
is already not matching the actual column name. As you see in my version, I include both the parametercolumn role
which is a description of the role of the column "anomaly score", and the actual column nameAnomalyDetectionEvaluator.TopKResultsColumns.AnomalyScore
as part of the exception message.In reply to: 251125939 [](ancestors = 251125939,250823347,250474268)
Uh oh!
There was an error while loading. Please reload this page.
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.
Right, this is meant to be human readable. What @Zruty0 was doing was trying to unify the error messages, I believe. And they were things like "the label column named 'Bubba' should be like this" or "the score column named 'Bizblam' should be like that," and whatnot. So I think the lowercase names for these roles specifically is appropriate, since it is just meant to be a textual message read and understood by a human.
For that same reason, I'm not too worried about these little strings everywhere. Considering that we have hundreds, possibly thousands of hand-written error messages, this seems fairly minor. So I'm not sure the situation requires something as elaborate as yet-another-static-class-full-of-strings. (I feel differently about something like
MetadataUtils.Kinds
where correctness of algorithms is at stake if we get those wrong.) At a certain point these things lend less clarity, not more, I think? #Resolved