MCPcopy Create free account
hub / github.com/Luce-Org/lucebox-hub / append_resource_rows

Function append_resource_rows

server/scripts/phase_split_dual_gpu.py:677–693  ·  view source on GitHub ↗
(resources: dict)

Source from the content-addressed store, hash-verified

675 "|---:|---:|---:|---:|---:|---:|---:|---:|",
676 ]
677 def append_resource_rows(resources: dict) -> None:
678 if not resources:
679 lines.append("| n/a | 0 | n/a | n/a | n/a | n/a | n/a | n/a |")
680 return
681 for gpu, res in resources.items():
682 lines.append(
683 "| {gpu} | {samples} | {mem} | {temp} | {pavg} | {pmax} | {uavg} | {umax} |".format(
684 gpu=gpu,
685 samples=res.get("samples", 0),
686 mem=fmt(res.get("mem_max_mib")),
687 temp=fmt(res.get("temp_max_c")),
688 pavg=fmt(res.get("power_avg_w")),
689 pmax=fmt(res.get("power_max_w")),
690 uavg=fmt(res.get("util_avg_pct")),
691 umax=fmt(res.get("util_max_pct")),
692 )
693 )
694
695 append_resource_rows(summary.get("pflash_resource_summary") or {
696 str(summary["pflash_gpu"]): summary.get("resource_summary") or {}

Callers 1

write_markdownFunction · 0.85

Calls 1

fmtFunction · 0.70

Tested by

no test coverage detected