[maintenance] Simplify wrap_output_data and fix transform_output guard#3248
Open
yuejiaointel wants to merge 1 commit into
Open
[maintenance] Simplify wrap_output_data and fix transform_output guard#3248yuejiaointel wants to merge 1 commit into
yuejiaointel wants to merge 1 commit into
Conversation
The transform_output host-transfer block was duplicated across the
array_api and non-array_api branches. Hoist it to a single early-return
at the top of the wrapper.
Also drop the redundant `transform_output in ("default", None)` guard
around the array-api result conversion. By the time control reached it,
the earlier transform/fit_transform block had already returned for the
non-default case, so the guard was either always True or incorrectly
suppressed namespace conversion on predict/score paths when the user
had set a global transform_output=polars/pandas.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
Contributor
Author
|
/intelci: run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The transform_output host-transfer block was duplicated across the array_api and non-array_api branches. Hoist it to a single early-return at the top of the wrapper.
Also drop the redundant
transform_output in ("default", None)guard around the array-api result conversion. By the time control reached it, the earlier transform/fit_transform block had already returned for the non-default case, so the guard was either always True or incorrectly suppressed namespace conversion on predict/score paths when the user had set a global transform_output=polars/pandas.Description
Checklist:
Completeness and readability
Testing