towhee.runtime.runtime_pipeline.Graph

class towhee.runtime.runtime_pipeline.Graph(nodes: Dict[str, NodeRepr], edges: Dict[str, Any], operator_pool: OperatorPool, thread_pool: ThreadPoolExecutor, time_profiler: Optional[TimeProfiler] = None)[source]

Bases: object

Graph.

Parameters:
  • nodes (Dict[str, NodeRepr]) – The pipeline nodes from DAGRepr.nodes.

  • edges (Dict[str, Any]) – The pipeline edges from DAGRepr.edges.

  • operator_pool (OperatorPool) – The operator pool.

  • thread_pool (OperatorPool) – The ThreadPoolExecutor.

Methods

initialize

result

__call__(*inputs)[source]

Call self as a function.

__init__(nodes: Dict[str, NodeRepr], edges: Dict[str, Any], operator_pool: OperatorPool, thread_pool: ThreadPoolExecutor, time_profiler: Optional[TimeProfiler] = None)[source]