8000 ENH implement metadata routing in Pipeline by adrinjalali · Pull Request #26789 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

ENH implement metadata routing in Pipeline #26789

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

Merged
merged 11 commits into from
Jul 13, 2023

Conversation

adrinjalali
Copy link
Member
@adrinjalali adrinjalali commented Jul 6, 2023

Towards #22893

This adds metadata routing to pipeline.

Closes #21134
Closes #18159
Closes #24507

@github-actions
Copy link
github-actions bot commented Jul 6, 2023

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 85583cd. Link to the linter CI: here

@adrinjalali
Copy link
Member Author

@thomasjpfan @glemaitre this should also be ready for a review

@adrinjalali
Copy link
Member Author

@OmarManzoor I'd also appreciate your feedback on this.

10000

Copy link
Contributor
@OmarManzoor OmarManzoor left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

@glemaitre glemaitre self-requested a review July 12, 2023 13:49
Copy link
Member
@glemaitre glemaitre left a 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")
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member Author
@adrinjalali adrinjalali left a 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")
Copy link
Member Author

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.

Copy link
Member
@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
0