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

try pickling model instead of failing based on state functions and change to UserConfigValidationException #2014

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

imatiach-msft
Copy link
Contributor

Description

In live site, seeing error in azureml when running RAI:

<class 'ValueError'>
File "/mnt/azureml/cr/j/[guid]/exe/wd/_telemetry/_loggerfactory.py", line 151 in wrapper
return func(*args, **kwargs)
File "create_error_analysis.py", line 79 in main
save_to_output_port(rai_i, args.error_analysis_path, RAIToolType.ERROR_ANALYSIS)
File "/mnt/azureml/cr/j/[guid]/exe/wd/rai_component_utilities.py", line 297 in save_to_output_port
rai_i.save(tmpdirname)
File "/azureml-envs/responsibleai/lib/python3.8/site-packages/responsibleai/rai_insights/rai_insights.py", line 845 in save
super(RAIInsights, self).save(path)
File "/azureml-envs/responsibleai/lib/python3.8/site-packages/responsibleai/rai_insights/rai_base_insights.py", line 219 in save
self._save_model(path)
File "/azureml-envs/responsibleai/lib/python3.8/site-packages/responsibleai/rai_insights/rai_base_insights.py", line 193 in _save_model
raise ValueError(

Instead of failing early based on setstate and getstate functions, we just print a warning and still try to pickle the model (but default pickle will serialize the dict if those functions are not there), and if that fails throw a UserConfigValidationException instead of a ValueError since it's a user error.

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 Report

Merging #2014 (98b286a) into main (f87f229) will decrease coverage by 0.97%.
The diff coverage is 57.14%.

@@            Coverage Diff             @@
##             main    #2014      +/-   ##
==========================================
- Coverage   93.07%   92.10%   -0.97%     
==========================================
  Files          48       78      +30     
  Lines        1963     3522    +1559     
==========================================
+ Hits         1827     3244    +1417     
- Misses        136      278     +142     
Flag Coverage Δ
unittests 92.10% <57.14%> (-0.97%) ⬇️

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

Impacted Files Coverage Δ
...ai/responsibleai/rai_insights/rai_base_insights.py 86.20% <57.14%> (ø)

... and 63 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@imatiach-msft imatiach-msft merged commit 2dc957c into microsoft:main Mar 29, 2023
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.

None yet

3 participants