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

Raise value error for min max computation of feature range #2072

Merged
merged 11 commits into from
Jun 3, 2023

Conversation

kicha0
Copy link
Contributor

@kicha0 kicha0 commented May 22, 2023

Raising value error for exception in converting min / max of a feature column to float, and printing the type of the argument.

Description

Observed value error:
<class 'ValueError'>
File "/mnt/azureml/cr/j/[guid]/exe/wd/_telemetry/_loggerfactory.py", line 143 in wrapper
return func(*args, **kwargs)
File "create_rai_insights.py", line 184 in main
_ = RAIInsights(
File "/azureml-envs/responsibleai/lib/python3.8/site-packages/responsibleai/rai_insights/rai_insights.py", line 236 in init
self._feature_ranges = RAIInsights._get_feature_ranges(
File "/azureml-envs/responsibleai/lib/python3.8/site-packages/responsibleai/rai_insights/rai_insights.py", line 1263 in _get_feature_ranges
max_value = float(test[col].max())

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.

@codecov-commenter
Copy link

codecov-commenter commented May 22, 2023

Codecov Report

Merging #2072 (e1e64f5) into main (36894f4) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2072   +/-   ##
=======================================
  Coverage   92.42%   92.43%           
=======================================
  Files         101      101           
  Lines        5017     5022    +5     
=======================================
+ Hits         4637     4642    +5     
  Misses        380      380           
Flag Coverage Δ
unittests 92.43% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...sibleai/responsibleai/rai_insights/rai_insights.py 87.47% <100.00%> (+0.11%) ⬆️

Copy link
Contributor

@gaugup gaugup left a comment

Choose a reason for hiding this comment

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

Could you please add a unit test for this change?

1 similar comment
@kicha0
Copy link
Contributor Author

kicha0 commented May 25, 2023

Could you please add a unit test for this change?

Hi, In the process of trying to troubleshoot we find missing exception information about the failure, this is exception handling (logging) for a case with unknown trigger condition. Could you suggest a suitable unit test for this as it's not clear what a dataset needs to look like in the first place to trigger a ValueError in this part.

2 similar comments
@kicha0 kicha0 enabled auto-merge (squash) June 2, 2023 20:05
@kicha0 kicha0 merged commit cde413c into main Jun 3, 2023
@kicha0 kicha0 deleted the kicha0/main/min_max_feature_range_error branch June 3, 2023 01:05
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