Skip to content

FIX ColumnTransformer metadata routing work within another meta-estimator#28188

Merged
glemaitre merged 9 commits into
scikit-learn:mainfrom
adrinjalali:slep6/fix-ct
Feb 1, 2024
Merged

FIX ColumnTransformer metadata routing work within another meta-estimator#28188
glemaitre merged 9 commits into
scikit-learn:mainfrom
adrinjalali:slep6/fix-ct

Conversation

@adrinjalali

Copy link
Copy Markdown
Member

Fixes #28186

The core of the issue is that ColumnTransformer().get_metadata_request() raises if called before fit. This fixes the issue.

Note that this means all metadata requested by all given transformers are always requested, no matter whether those transformers are going to be used or not, due to column selections.

@github-actions

github-actions Bot commented Jan 19, 2024

Copy link
Copy Markdown

✔️ Linting Passed

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

Generated for commit: 3272c34. Link to the linter CI: here

@adrinjalali adrinjalali added this to the 1.4.1 milestone Jan 19, 2024
@adrinjalali

Copy link
Copy Markdown
Member Author

cc @OmarManzoor @glemaitre

@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

Comment thread doc/whats_new/v1.4.rst
DataFrame Support
-----------------

- |Enhancement| Pandas and Polars dataframe are validated directly without ducktyping

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.

Is this part of this PR?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yes, was under the wrong section, but I had forgotten to remove the duplicate. Fixed now.

@glemaitre

Copy link
Copy Markdown
Member

I fixed the issue with the changelog and enabling auto-merge. Thanks @adrinjalali

@glemaitre glemaitre enabled auto-merge (squash) February 1, 2024 17:17
@glemaitre glemaitre merged commit 61068a7 into scikit-learn:main Feb 1, 2024
@adrinjalali adrinjalali deleted the slep6/fix-ct branch February 1, 2024 18:20
glemaitre added a commit to glemaitre/scikit-learn that referenced this pull request Feb 10, 2024
…ator (scikit-learn#28188)

Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
glemaitre added a commit to glemaitre/scikit-learn that referenced this pull request Feb 13, 2024
…ator (scikit-learn#28188)

Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
glemaitre added a commit that referenced this pull request Feb 13, 2024
…ator (#28188)

Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Metadata Routing breaks ColumnTransformer

4 participants