MCPcopy Create free account
hub / github.com/InternRobotics/G2VLM / __init__

Method __init__

eval_code/recons/models/moge/utils/pipeline.py:347–362  ·  view source on GitHub ↗
(self, nodes: Iterable[Node], in_buffer_size: int = 1, out_buffer_size: int = 1, function_running_as: Literal['thread', 'process'] = 'thread')

Source from the content-addressed store, hash-verified

345 nodes: List[Node]
346
347 def __init__(self, nodes: Iterable[Node], in_buffer_size: int = 1, out_buffer_size: int = 1, function_running_as: Literal['thread', 'process'] = 'thread'):
348 super().__init__(in_buffer_size, out_buffer_size)
349 self.nodes = []
350 for node in nodes:
351 if isinstance(node, Node):
352 pass
353 elif isinstance(node, Callable):
354 if inspect.isgeneratorfunction(node):
355 node = ProviderFunction(node, function_running_as)
356 else:
357 node = WorkerFunction(node, function_running_as)
358 else:
359 raise ValueError(f"Invalid node type: {type(node)}")
360 self.nodes.append(node)
361 self.output_order = Queue()
362 self.lock = threading.Lock()
363
364 def _in_thread_fn(self, node: Node):
365 try:

Callers

nothing calls this directly

Calls 3

ProviderFunctionClass · 0.85
WorkerFunctionClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected