Pipeline

class falcon.abstract.Pipeline(task: str, **kwargs: Any)

Base class for all pipelines.

__init__(task: str, **kwargs: Any) None
add_element(element: PipelineElement) None

Adds element to pipeline. The input type of added element should match the output type of the last element in the pipeline.

Parameters

element (PipelineElement) – element to be added to the end of the pipeline

abstract fit(X: ndarray[Any, dtype[ScalarType]], y: ndarray[Any, dtype[ScalarType]], *args: Any, **kwargs: Any) Any
Parameters
  • X (npt.NDArray) – features

  • y (npt.NDArray) – targets

Returns

usually None

Return type

Any

abstract predict(X: ndarray[Any, dtype[ScalarType]], *args: Any, **kwargs: Any) ndarray[Any, dtype[ScalarType]]
Parameters

X (npt.NDArray) – features

Returns

predictions

Return type

npt.NDArray

save() ModelProto

Exports the pipeline to ONNX ModelProto

Returns

Pipeline as ONNX ModelProto

Return type

ModelProto