MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / render_output

Function render_output

benchmarks/src/postprocessing/monitor.py:556–575  ·  view source on GitHub ↗
(report: ClusterReport)

Source from the content-addressed store, hash-verified

554
555
556def render_output(report: ClusterReport):
557 def render_node_output(node: Node) -> Optional[Model]:
558 processes = [p for p in node.processes if is_valid_process(p)]
559
560 def render_process_output(process: ProcessInfo) -> Optional[Model]:
561 items = [("out", process.process.stdout), ("err", process.process.stderr)]
562
563 def render_item(item: Tuple[str, str]):
564 name, path = item
565 path = Path(path)
566 if path.is_file():
567 content = load_process_output(path)
568 content = PreText(text=content)
569 return Panel(child=content, title=name)
570
571 return Panel(child=create_tabs(items, render_item), title=process.key)
572
573 return Panel(child=create_tabs(processes, render_process_output), title=node.hostname)
574
575 return create_node_tabs(report, render_node_output)
576
577
578def render_process_resource_usage(report: ClusterReport, per_process_df: pd.DataFrame):

Callers

nothing calls this directly

Calls 1

create_node_tabsFunction · 0.85

Tested by

no test coverage detected