Skip to content

ENH warn if {transform, predict} consume metadata but no custom fit_{transform, predict} is defined - #26831

Merged
OmarManzoor merged 4 commits into
scikit-learn:mainfrom
adrinjalali:slep6/composite_warning
Jul 14, 2023
Merged

OmarManzoor merged 4 commits into
scikit-learn:mainfrom
adrinjalali:slep6/composite_warning

Conversation

@adrinjalali

Copy link
Copy Markdown
Member

In #26789 we encountered a case where transform would consume a metadata, but pipeline would call fit_transform which only routes metadata to fit. This PR makes it so that in those cases a warning is raised.

cc @glemaitre

@github-actions

github-actions Bot commented Jul 13, 2023 •

Copy link
Copy Markdown

✔️ Linting Passed

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

Generated for commit: 513c10f. Link to the linter CI: here

@glemaitre glemaitre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM on my side.

Comment thread sklearn/base.py Outdated
Co-authored-by: Omar Salman <omar.salman@arbisoft.com>

@OmarManzoor OmarManzoor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Thanks!

@adrinjalali

Copy link
Copy Markdown
Member Author

@OmarManzoor wanna push the green button 😁 ?

@OmarManzoor

Copy link
Copy Markdown
Contributor

@OmarManzoor wanna push the green button 😁 ?

Sure 🙂

@OmarManzoor
OmarManzoor merged commit b004f3a into scikit-learn:main Jul 14, 2023
@adrinjalali
adrinjalali deleted the slep6/composite_warning branch July 14, 2023 12:56
punndcoder28 pushed a commit to punndcoder28/scikit-learn that referenced this pull request Jul 29, 2023
…transform, predict} is defined (scikit-learn#26831)

Co-authored-by: Omar Salman <omar.salman@arbisoft.com>
REDVM pushed a commit to REDVM/scikit-learn that referenced this pull request Nov 16, 2023
…transform, predict} is defined (scikit-learn#26831)

Co-authored-by: Omar Salman <omar.salman@arbisoft.com>
@StefanieSenger StefanieSenger added the Metadata Routing all issues related to metadata routing, slep006, sample props label Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Metadata Routing all issues related to metadata routing, slep006, sample props module:utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants