-
Notifications
You must be signed in to change notification settings - Fork 89
Refactor ComponentGraph methods #2902
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
Conversation
self._feature_provenance = self._get_feature_provenance(X.columns) | ||
return self | ||
|
||
def fit_features(self, X, y): | ||
"""Fit all components save the final one, usually an estimator. | ||
def fit_and_transform_all_but_final(self, X, y): |
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 think it's fine to leave this method as is rather than trying to move it to time_series_base
because it allows us to easily implement other pipeline types in the future that could benefit from this method. While we currently only use it for the time_series_base
file, I believe the method makes sense existing where it currently is with the ComponentGraph
class.
Additionally, I wouldn't want to delete this method and have time_series_base
call the underlying private method since that would go against the design and structure of using private/public methods and naming conventions
Codecov Report
@@ Coverage Diff @@
## main #2902 +/- ##
=====================================
Coverage 99.7% 99.7%
=====================================
Files 302 302
Lines 28394 28394
=====================================
Hits 28301 28301
Misses 93 93
Continue to review full report at Codecov.
|
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 but let's add the API changes as breaking changes!
docs/source/release_notes.rst
Outdated
@@ -10,6 +10,7 @@ Release Notes | |||
* Changes | |||
* Deleted scikit-learn ensembler :pr:`2819` | |||
* Refactored pipeline building logic out of ``AutoMLSearch`` and into ``IterativeAlgorithm`` :pr:`2854` | |||
* Refactored names for methods in ``ComponentGraph`` :pr:`2902` | |||
* Documentation Changes | |||
* Updated ``install.ipynb`` to reflect flexibility for ``cmdstan`` version installation :pr:`2880` | |||
* Testing Changes |
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.
could we add the API changes to breaking changes?
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.
Good call!
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.
@bchen1116 I think this looks good to me! I think the new names for the ComponentGraph methods make sense.
Maybe we should get @angela97lin 's thoughts on this before merge. One thing that comes to mind is that maybe we should change the name of the PipelineBase.compute_estimator_features to be transform_all_but_final? No need to do this change unless we all agree though.
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 doing this @bchen1116! Agreed with @freddyaboulton that I like transform_all_but_final
but I see you've already made that change 😂
LGTM 🚢
fix #2795