New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX Preserve parameters when slicing a pipeline #18429
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise lgtm, thanks @albertvillanova
sklearn/tests/test_pipeline.py
Outdated
assert pipe2.steps == pipe.steps[:-1] | ||
assert 2 == len(pipe2.named_steps) | ||
assert_raises(ValueError, lambda: pipe[::-1]) | ||
@pytest.mark.parametrize("start, end", [(0, 1), (0, 2), (1, 2), (1, 3)]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please test one or both of the indices being None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done @jnothman
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Many thanks @albertvillanova for seeing these changes through, I couldn't find the time to finish the original PR. |
@pwl, you are welcome. |
Co-authored-by: Paweł Biernat <pawel.biernat@ardigen.com>
Reference Issues/PRs
Fix #16863.
Supersede and close #16868.