Skip to content
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

Merged
merged 10 commits into from Sep 21, 2020

Conversation

albertvillanova
Copy link
Contributor

Reference Issues/PRs

Fix #16863.
Supersede and close #16868.

@albertvillanova albertvillanova marked this pull request as ready for review September 18, 2020 15:06
Copy link
Member

@jnothman jnothman left a 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

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)])
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done @jnothman

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

LGTM

@thomasjpfan thomasjpfan merged commit 174f935 into scikit-learn:master Sep 21, 2020
5 checks passed
@pwl
Copy link

pwl commented Sep 21, 2020

Many thanks @albertvillanova for seeing these changes through, I couldn't find the time to finish the original PR.

@albertvillanova
Copy link
Contributor Author

@pwl, you are welcome.

jayzed82 pushed a commit to jayzed82/scikit-learn that referenced this pull request Oct 22, 2020
Co-authored-by: Paweł Biernat <pawel.biernat@ardigen.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.

A slice of a pipeline does not preserve the keyword arguments
4 participants