towhee.runtime.operator_manager.operator_action.OperatorAction¶
- class towhee.runtime.operator_manager.operator_action.OperatorAction[source]¶
Bases:
object
Action wrapper.
Different types of operations are loaded into this wrapper for the DAG, each operators can be loaded and run in different ways.
Methods
Create an Action for callable op.
Create an Action for hub op.
Create an Action for lambda op.
serialize
Attributes
type
- static from_callable(fn)[source]¶
Create an Action for callable op.
- Parameters:
fn (callable) – The callable function for op.
- Returns:
The action.
- Return type:
Action