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

Deprecate categorical_features argument in favor of feature_metadata.categorical_features, improve metadata validation, and add forecasting-related metadata #1934

Merged
merged 26 commits into from
Feb 3, 2023

Conversation

romanlutz
Copy link
Contributor

@romanlutz romanlutz commented Feb 1, 2023

Description

Deprecating the existing arg with a note to switch to feature_metadata.categorical_features. After v0.26 we can remove it entirely. The reason I'm creating this is because the duplicate way of providing categorical features can cause all sorts of trouble if unhandled (which is currently the case).

This PR also improves the validation code in FeatureMetadata and adds forecasting-related fields like time_column_name and time_series_id_column_names.

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

Codecov Report

Merging #1934 (9319d64) into main (dcd0a4a) will decrease coverage by 0.05%.
The diff coverage is 94.28%.

@@            Coverage Diff             @@
##             main    #1934      +/-   ##
==========================================
- Coverage   93.27%   93.23%   -0.05%     
==========================================
  Files          95       95              
  Lines        4657     4700      +43     
==========================================
+ Hits         4344     4382      +38     
- Misses        313      318       +5     
Flag Coverage Δ
unittests 93.23% <94.28%> (-0.05%) ⬇️

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 92.42% <91.30%> (-0.88%) ⬇️
responsibleai/responsibleai/__init__.py 100.00% <100.00%> (ø)
responsibleai/responsibleai/feature_metadata.py 100.00% <100.00%> (+4.34%) ⬆️
...ponsibleai/responsibleai/rai_insights/constants.py 100.00% <100.00%> (ø)

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

@romanlutz romanlutz changed the title Deprecate categorical_features argument in favor of feature_metadata.categorical_features Deprecate categorical_features argument in favor of feature_metadata.categorical_features, improve metadata validation, and add forecasting-related metadata Feb 1, 2023
responsibleai/responsibleai/__init__.py Show resolved Hide resolved
responsibleai/responsibleai/feature_metadata.py Outdated Show resolved Hide resolved
responsibleai/responsibleai/feature_metadata.py Outdated Show resolved Hide resolved
responsibleai/responsibleai/rai_insights/rai_insights.py Outdated Show resolved Hide resolved
responsibleai/responsibleai/rai_insights/rai_insights.py Outdated Show resolved Hide resolved
responsibleai/responsibleai/rai_insights/rai_insights.py Outdated Show resolved Hide resolved
responsibleai/responsibleai/rai_insights/rai_insights.py Outdated Show resolved Hide resolved
2 similar comments
@romanlutz romanlutz enabled auto-merge (squash) February 3, 2023 03:27
@romanlutz romanlutz merged commit 3f4fdf3 into main Feb 3, 2023
@romanlutz romanlutz deleted the romanlutz/categorical_features branch February 3, 2023 05:53
RubyZ10 pushed a commit that referenced this pull request Feb 7, 2023
…categorical_features, improve metadata validation, and add forecasting-related metadata (#1934)

* feature metadata and categorical_features consolidation

* fix serialization of feature metadata

* fix tests

* flake8

* tests for feature metadata and cat features

* flake8

* fix string

* datetime_features and time_series_id_features replacement

* pytest.mark.skip

* remaining ts id col names fix

* fix failing test

* fix docstrings

* constants for feature purposes

* revert validation function name to original and fix docstring of other validation function

* flake8

* isort

* undo workaround in feature metadata validation code

* move feature metadata validation into a separate method

* flake8

* add constants for strings

* use set

Signed-off-by: RubyZ10 <zhenzhu@microsoft.com>
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.

5 participants