Closed MBrouns closed 3 years ago
The slicing feels like a solid trick. Especially when you consider that the alternative might be a PartialDebugPipeline
😅 .
Right, that was a simple fix. Getting rid of the __init__
that did nothing else than call super
fixes it
Normal sklearn pipelines allow getting out sub-pipelines by using the sequence slicing notation. I use this frequently to check and debug the data right before it goes into the model. This doesn't work for PartialPipeline because some arguments are missing in the constructor.
This PR currently only contains a test case illustrating the behaviour. Do you want to support slicing for partial pipelines as well? Then I'll update the PR with the required changes.