Skip to content

FIX Disable set_output for label encoder#26940

Merged
adrinjalali merged 3 commits intoscikit-learn:mainfrom
thomasjpfan:label_encoder_does_not_subclass
Jul 31, 2023
Merged

FIX Disable set_output for label encoder#26940
adrinjalali merged 3 commits intoscikit-learn:mainfrom
thomasjpfan:label_encoder_does_not_subclass

Conversation

@thomasjpfan
Copy link
Copy Markdown
Member

@thomasjpfan thomasjpfan commented Jul 30, 2023

Reference Issues/PRs

Fixes #26854

What does this implement/fix? Explain your changes.

This PR uses auto_wrap_output_keys=None to fully disable set_output for the label encoders and any wrapping. The set output API was not designed to transform y.

Any other comments?

Even with this PR, Sphinx still picks up set_output and adds it as a method in the API docs. Given that this PR fixes the functionality, I think we can merge and follow up with the documentation fix.

@thomasjpfan thomasjpfan added the To backport PR merged in master that need a backport to a release branch defined based on the milestone. label Jul 30, 2023
@thomasjpfan thomasjpfan added this to the 1.3.1 milestone Jul 30, 2023
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 30, 2023

✔️ Linting Passed

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

Generated for commit: e69fff5. Link to the linter CI: here

Copy link
Copy Markdown
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.

Thanks for the PR. Just a small suggestion otherwise looks good!

Co-authored-by: Omar Salman <omar.salman@arbisoft.com>
@adrinjalali adrinjalali enabled auto-merge (squash) July 31, 2023 08:09
@adrinjalali adrinjalali merged commit 3dea102 into scikit-learn:main Jul 31, 2023
glemaitre pushed a commit to glemaitre/scikit-learn that referenced this pull request Sep 18, 2023
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
Co-authored-by: Omar Salman <omar.salman@arbisoft.com>
jeremiedbb pushed a commit that referenced this pull request Sep 20, 2023
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
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
Co-authored-by: Adrin Jalali <adrin.jalali@gmail.com>
Co-authored-by: Omar Salman <omar.salman@arbisoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:preprocessing To backport PR merged in master that need a backport to a release branch defined based on the milestone.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exception when transforming LabelEncoder with keyword argument

3 participants