MCPcopy Create free account
hub / github.com/OpenBMB/ChatDev / __init__

Method __init__

workflow/executor/dag_executor.py:19–38  ·  view source on GitHub ↗

Initialize the executor. Args: log_manager: Logger instance nodes: Mapping of node ids to ``Node`` objects layers: Topological layers execute_node_func: Callable used to execute a single node

(
        self,
        log_manager: LogManager,
        nodes: Dict[str, Node],
        layers: List[List[str]],
        execute_node_func: Callable[[Node], None]
    )

Source from the content-addressed store, hash-verified

17 """
18
19 def __init__(
20 self,
21 log_manager: LogManager,
22 nodes: Dict[str, Node],
23 layers: List[List[str]],
24 execute_node_func: Callable[[Node], None]
25 ):
26 """Initialize the executor.
27
28 Args:
29 log_manager: Logger instance
30 nodes: Mapping of node ids to ``Node`` objects
31 layers: Topological layers
32 execute_node_func: Callable used to execute a single node
33 """
34 self.log_manager = log_manager
35 self.nodes = nodes
36 self.layers = layers
37 self.execute_node_func = execute_node_func
38 self.parallel_executor = ParallelExecutor(log_manager, nodes)
39
40 def execute(self) -> None:
41 """Execute the DAG workflow."""

Callers

nothing calls this directly

Calls 1

ParallelExecutorClass · 0.90

Tested by

no test coverage detected