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

Function create_tabs

benchmarks/src/postprocessing/monitor.py:535–545  ·  view source on GitHub ↗

Creates a tab for each passed item. If `render_fn` returns `None`, the tab for the corresponding node will not be created.

(items: List[T], render_fn: Callable[[T], Model])

Source from the content-addressed store, hash-verified

533
534
535def create_tabs(items: List[T], render_fn: Callable[[T], Model]):
536 """
537 Creates a tab for each passed item.
538 If `render_fn` returns `None`, the tab for the corresponding node will not be created.
539 """
540 tabs = []
541 for item in items:
542 widget = render_fn(item)
543 if widget is not None:
544 tabs.append(widget)
545 return Tabs(tabs=tabs)
546
547
548def create_node_tabs(report: ClusterReport, render_fn: Callable[[Node], Model]):

Callers 6

render_processFunction · 0.85
render_profiling_dataFunction · 0.85
create_node_tabsFunction · 0.85
render_process_outputFunction · 0.85
render_node_outputFunction · 0.85
render_nodeFunction · 0.85

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected