This is a rewrite of Pipeline, as discussed in many places. Please see the rewrite.ipynb notebook for some context.
List of changes
TypeVars need to be constrained. The new mechanism eagerly inserts duplicate nodes based on this.
Mechanism to favor most-specialized provider is removed. The last provider being inserted is the one that is used. This may be a pitfall, but otherwise it is never clear if an insert should replace existing providers or not, and may even make it impossible to replace specialized providers with a generic one. The new implementation is very simple, so that is what we do.
Param table support removed, in favor of map and reduce based on Cyclebane. Not that groupby is not supported yet, but we have never used this in practice.
Provider input type hints must be unique.
__setitem__ and __getitem__ can be used to compose more complex graphs, sidestepping the dependency-injection-driven assembly of the base pipeline.
Overview
This is a rewrite of
Pipeline
, as discussed in many places. Please see therewrite.ipynb
notebook for some context.List of changes
TypeVar
s need to be constrained. The new mechanism eagerly inserts duplicate nodes based on this.insert
should replace existing providers or not, and may even make it impossible to replace specialized providers with a generic one. The new implementation is very simple, so that is what we do.map
andreduce
based on Cyclebane. Not thatgroupby
is not supported yet, but we have never used this in practice.__setitem__
and__getitem__
can be used to compose more complex graphs, sidestepping the dependency-injection-driven assembly of the base pipeline.