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 categorical string column is treated as numeric and error analysis is run #1562

Merged
merged 1 commit into from
Jul 26, 2022

Conversation

imatiach-msft
Copy link
Contributor

Description

When a column is not specified as categorical, although it has string values, and then error analysis is run on the column, a cryptic crash can appear:

TypeError: '<=' not supported between instances of 'str' and 'float'

This PR improves the error message to be more useful to the user when using error analysis:

Column MY_COL_NAME of type string is incorrectly treated as numeric with threshold value 7.77. Please make sure it is marked as categorical instead.

Checklist

  • I have added screenshots above for all UI changes.
  • I have added e2e tests for all UI changes.
  • Documentation was updated if it was needed.

@imatiach-msft imatiach-msft force-pushed the ilmat/improve-err-cat-as-num-tree branch from 921b39f to 3898d4c Compare July 15, 2022 20:44
@codecov-commenter
Copy link

codecov-commenter commented Jul 15, 2022

Codecov Report

Merging #1562 (3784bf4) into main (23fe4d7) will increase coverage by 0.04%.
The diff coverage is 93.75%.

@@            Coverage Diff             @@
##             main    #1562      +/-   ##
==========================================
+ Coverage   88.07%   88.12%   +0.04%     
==========================================
  Files         109      109              
  Lines        5310     5323      +13     
==========================================
+ Hits         4677     4691      +14     
+ Misses        633      632       -1     
Flag Coverage Δ
unittests 88.12% <93.75%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...is/erroranalysis/_internal/surrogate_error_tree.py 87.78% <93.33%> (+0.86%) ⬆️
erroranalysis/erroranalysis/version.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 23fe4d7...3784bf4. Read the comment docs.

@imatiach-msft imatiach-msft force-pushed the ilmat/improve-err-cat-as-num-tree branch 2 times, most recently from 066f66e to 9d2c60f Compare July 15, 2022 20:57
3 similar comments
@imatiach-msft imatiach-msft force-pushed the ilmat/improve-err-cat-as-num-tree branch from 9d2c60f to e7b2a09 Compare July 26, 2022 15:12
@imatiach-msft imatiach-msft force-pushed the ilmat/improve-err-cat-as-num-tree branch from e7b2a09 to 3784bf4 Compare July 26, 2022 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants