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

Support forecasting in RAIInsights #1948

Merged
merged 23 commits into from
Mar 3, 2023
Merged

Conversation

romanlutz
Copy link
Contributor

Description

Notable changes:

  • ml_wrappers dependency added. The forecasting model wrapper is currently part of this PR, but will move to ml-wrappers shortly. At that point, I'll remove it from here. The dependency is for the base wrapper class.
  • RAIInsights has fields predict_output and predict_proba_output as well as the same with large_ as prefix. For forecasting, I needed something similar, although those particular names don't quite make sense. After exploring some options I set up corresponding fields forecast_output and forecast_quantiles_output (and the large_ ones for them). I couldn't find any usage of these outside of RAIInsights, so I prefixed everything with an underscore. I need confirmation that that's acceptable, though. The way their contents are calculated has also been streamlined to avoid 8 sets of model.<method>(...) after another.
  • self._initialize_managers() needed to be moved out of the base RAIInsights constructor because of an interdependency between the RAIInsights constructor and the validation method. The manager initialization requires a lot of the fields to be set, while the validation needs to occur for that to happen. On the other hand, the base constructor is the one that sets many of those fields, in particular the model. Since we have to wrap the model for forecasting this becomes impossible otherwise. It's now just at the end of the RAIInsights constructor.
  • predict_proba for classification is optional in this PR. I can keep it as mandatory since that's what we had so far, but that's technically excluding lots of perfectly fine classification models.
  • even after merging, this feature won't really be available yet. There's a feature flag added called forecasting_enabled.

About to be added:

  • more test cases in responsibleai/tests
  • I will have a separate PR with a notebook and e2e tests on that notebook

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 Feb 7, 2023

Codecov Report

Merging #1948 (038e970) into main (f675122) will decrease coverage by 0.26%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1948      +/-   ##
==========================================
- Coverage   93.31%   93.06%   -0.26%     
==========================================
  Files         105       48      -57     
  Lines        4985     1960    -3025     
==========================================
- Hits         4652     1824    -2828     
+ Misses        333      136     -197     
Flag Coverage Δ
unittests 93.06% <ø> (-0.26%) ⬇️

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

Impacted Files Coverage Δ
responsibleai/responsibleai/__init__.py
responsibleai/responsibleai/_interfaces.py
responsibleai/responsibleai/_internal/constants.py
...onsibleai/responsibleai/managers/causal_manager.py
...i/responsibleai/managers/counterfactual_manager.py
...i/responsibleai/managers/error_analysis_manager.py
...ibleai/responsibleai/managers/explainer_manager.py
...ponsibleai/responsibleai/modelanalysis/__init__.py
.../responsibleai/modelanalysis/constants/__init__.py
...sponsibleai/responsibleai/rai_insights/__init__.py
... and 46 more

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

Copy link
Contributor

@imatiach-msft imatiach-msft left a comment

Choose a reason for hiding this comment

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

Posting some general comments

1 similar comment
1 similar comment
@romanlutz romanlutz enabled auto-merge (squash) March 3, 2023 18:02
@romanlutz romanlutz merged commit 6d4055f into main Mar 3, 2023
@romanlutz romanlutz deleted the romanlutz/forecasting_responsibleai branch March 3, 2023 19:01
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