-
Notifications
You must be signed in to change notification settings - Fork 91
Return transformed target in ComponentGraph.fit_features #2780
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
Return transformed target in ComponentGraph.fit_features #2780
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2780 +/- ##
=======================================
+ Coverage 99.8% 99.8% +0.1%
=======================================
Files 298 298
Lines 27604 27631 +27
=======================================
+ Hits 27536 27563 +27
Misses 68 68
Continue to review full report at Codecov.
|
25330ac to
d961cf6
Compare
ParthivNaresh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Does this require performance testing and/or pre and post comparison for permutation importance?
| }, | ||
| ) | ||
| pipeline.fit(X, y) | ||
| pd.testing.assert_series_equal(mock_to_check.call_args[0][1], y + 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting how this fails with Woodwork 0.6.0 because you're trying to add an int to a categorical but passes with 0.7.1 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then how come min-dependencies git-test-other passes? That installs ww 0.6.0? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I have woodwork 0.6.0 locally and this passes 🤔 )
angela97lin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you! 🚢
evalml/pipelines/component_graph.py
Outdated
| Returns: | ||
| pd.DataFrame: Transformed values. | ||
| Tuple: pd.DataFrame, pd.Series: Transformed features and target. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 😂
I'm not sure if this intended but it looks like sphinx / napoleon separates the return type only on the first colon: https://feature-labs-inc-evalml--2780.com.readthedocs.build/en/2780/autoapi/evalml/pipelines/index.html#evalml.pipelines.ComponentGraph.fit_features
If we do Tuple(pd.DataFrame, pd.Series) (unclear of exact syntax, might be square brackets heh), we could get it all on the return type line :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for letting me know!
| }, | ||
| ) | ||
| pipeline.fit(X, y) | ||
| pd.testing.assert_series_equal(mock_to_check.call_args[0][1], y + 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I have woodwork 0.6.0 locally and this passes 🤔 )
3e92131 to
dd83f62
Compare
|
@ParthivNaresh Forgot to reply to your comment. I don't think the perf tests are necessary in this case. This really only impacts time series pipelines with a detrender or log transformer and those are not added to the perf tests pipelines (because they don't meet the log normal check and because we don't automatically add detrenders to pipelines). |
Pull Request Description
Fixes #2703
I realized it's easier to update
fit_featuresas opposed tocompute_estimator_features. It's also a smaller change this way.This can go in the release in two weeks. Just opening up for review.
After creating the pull request: in order to pass the release_notes_updated check you will need to update the "Future Release" section of
docs/source/release_notes.rstto include this pull request by adding :pr:123.