towhee.operator.base.PyOperator

class towhee.operator.base.PyOperator[source]

Bases: Operator

Python function operator, no machine learning frameworks involved.

Methods

Attributes

flag

key

shared_type

abstract __call__()

The framework calls __call__ function repeatedly for every input data.

Args:

Returns:

Raises:

An exception during __init__ can terminate the graph run.

__init__()[source]

Init operator, before a graph starts, the framework will call Operator __init__ function.

Args:

Raises:

An exception during __init__ can terminate the graph run.