alegonz / baikal

A graph-based functional API for building complex scikit-learn pipelines.
https://baikal.readthedocs.io
BSD 3-Clause "New" or "Revised" License
592 stars 30 forks source link

[BUGFIX] Use list args for multi inputs/targets #21

Closed alegonz closed 4 years ago

alegonz commented 4 years ago

Fix an API inconsistency regarding the handling of the arguments of fit/compute for steps with multiple inputs and targets. Before this fix the multiple inputs and targets would passed unpacked to the fit/compte (i.e. step.fit(*Xs, *ys)) which is inconsistent with the API of Model and thus impossible to use nested models with multiple inputs/targets.

With this fix steps that take multiple inputs/targets must have fit/compute methods similar to Model, i.e. either a single array-like object in the case of single input/target or a list of such objects in the case of multiple inputs/targets.