Merged
Conversation
ColumnRemapper: inspect and remap ColumnTransformer column references using fully path-qualified slash-separated keys (e.g. "preprocessor/num"). Validates keys against list_column_refs; strict=True requires full coverage. ParamRemapper: remap arbitrary sklearn params using __ convention (e.g. "classifier__C", "preprocessor__num__imputer__strategy"). Supports whole-step replacement via exact name match. Validates keys against pipeline.get_params(deep=True); strict=True requires full coverage. Both classes are @attr.frozen with @property/@cache derived views. Reconstruction is immutable throughout — no setattr, no clone-then-mutate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Both methods apply the corresponding remapper to Pipeline.instance and return a new Pipeline.from_instance(remapped). Imports are local to avoid circular dependencies. strict= is forwarded to remap(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Covers: basic remapping, immutability of original, return type, unknown key errors, strict mode, nested params, and whole-step replacement. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sklearn_utils imports sklearn at module level, so importing ColumnRemapper
before pytest.importorskip("sklearn") caused an unconditional sklearn import
at collection time, breaking test collection when sklearn is not installed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ghoersti
approved these changes
Mar 11, 2026
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.
No description provided.