-
-
Notifications
You must be signed in to change notification settings - Fork 25.2k
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
ENH implement metadata routing in Pipeline #26789
Conversation
@thomasjpfan @glemaitre this should also be ready for a review |
@OmarManzoor I'd also appreciate your feedback on this. |
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! Thanks!
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 on my side. Just if we could a couple of test for the uncovered lines.
try: | ||
getattr(pipeline, method)([[1]], [1], sample_weight=[1], prop="a") | ||
except TypeError: | ||
getattr(pipeline, method)([[1]], sample_weight=[1], prop="a") |
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.
We should mention why we bypass the TypeError
. I assume this is for estimators that only accept X
?
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.
not estimators, methods. fit
takes X, y
, while predict
takes only X
. I'll add 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.
This should address your comments now @glemaitre
try: | ||
getattr(pipeline, method)([[1]], [1], sample_weight=[1], prop="a") | ||
except TypeError: | ||
getattr(pipeline, method)([[1]], sample_weight=[1], prop="a") |
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.
not estimators, methods. fit
takes X, y
, while predict
takes only X
. I'll add 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
Towards #22893
This adds metadata routing to pipeline.
Closes #21134
Closes #18159
Closes #24507