fleet: the collector keyed by card and VRAM with a raw-rows fallback; the matrix script's final write guarded against a card that reports no power
This commit is contained in:
parent
a1f83bf16f
commit
f2ce7bd8b4
2 changed files with 12 additions and 4 deletions
|
|
@ -122,6 +122,6 @@ python3 - "$OUT" "$LABEL" "$NAME" "$TOTAL" "$DRV" "$IDLE_MIB" "$IDLE_W" "$PLIM"
|
|||
import json, sys
|
||||
out, label, name, total, drv, idle, idle_w, plim = sys.argv[1:]
|
||||
rows = [json.loads(l) for l in open(f"{out}/rows.jsonl") if l.strip()]
|
||||
json.dump({"label": label, "card": name, "total_mib": int(total), "driver": drv, "idle_mib": int(idle), "idle_w": float(idle_w or 0), "power_limit_w": float(plim or 0), "rows": rows}, open(f"{out}/matrix.json", "w"), indent=1)
|
||||
json.dump({"label": label, "card": name, "total_mib": int(total), "driver": drv, "idle_mib": int(idle), "idle_w": float(idle_w) if idle_w.replace(".", "").isdigit() else 0, "power_limit_w": float(plim) if plim.replace(".", "").isdigit() else 0, "rows": rows}, open(f"{out}/matrix.json", "w"), indent=1)
|
||||
PY
|
||||
echo "RESULT matrix_done $(stamp) points=$(grep -c '"row":"point"' $ROWS)"
|
||||
|
|
|
|||
|
|
@ -16,8 +16,15 @@ def gb(mib): return round(mib / 1024, 1)
|
|||
rows = {}; table = []
|
||||
for iid, b in reg.items():
|
||||
mp = f"{ROOT}/{iid}/matrix.json" # every box with a matrix (a box moves to phase 2 when its Ember ladder ends)
|
||||
if not os.path.exists(mp): continue
|
||||
m = json.load(open(mp)); pts = {r["name"]: r for r in m["rows"] if r.get("row") == "point"}; miner = next((r for r in m["rows"] if r.get("row") == "miner"), {})
|
||||
rj = f"{ROOT}/{iid}/rows.jsonl"
|
||||
if os.path.exists(mp): m = json.load(open(mp))
|
||||
elif os.path.exists(rj): # the box's final step failed (the 4060 reported power_w=[N/A]): rebuild from the raw rows and the start line
|
||||
ml = f"{ROOT}/{iid}/matrix.log"; start = [l for l in open(ml, errors="replace") if l.startswith("RESULT start")][-1] if os.path.exists(ml) else ""
|
||||
g = lambda k, d="": (start.split(k + "=")[1].split()[0] if k + "=" in start else d)
|
||||
idl = [l for l in open(ml, errors="replace") if l.startswith("RESULT idle")][-1] if os.path.exists(ml) else ""
|
||||
m = {"label": b["label"], "card": g("card", b["card"]), "total_mib": int(g("total_mib", b.get("vram_mb") or 0)), "driver": g("driver"), "idle_mib": int(idl.split("mem_mib=")[1].split()[0]) if "mem_mib=" in idl else 0, "idle_w": 0, "rows": [json.loads(l) for l in open(rj) if l.strip()]}
|
||||
else: continue
|
||||
pts = {r["name"]: r for r in m["rows"] if r.get("row") == "point"}; miner = next((r for r in m["rows"] if r.get("row") == "miner"), {})
|
||||
total = m["total_mib"]; idle = m["idle_mib"]
|
||||
# the miner's rate from the raw STATUS lines (the first matrices parsed a second now= field): the mean of the last
|
||||
# 12 STATUS lines before the miner was stopped for the stock point, i.e. the sampled window
|
||||
|
|
@ -39,6 +46,7 @@ for iid, b in reg.items():
|
|||
elif alone: verdict = "proves alone"
|
||||
else: verdict = "mining only"
|
||||
card = b.get("card") or m["card"]
|
||||
card = card if "4060 Ti" not in card else f"RTX 4060 Ti {round(total / 1024)} GB"
|
||||
r = {"card": card, "vram_gb": round(total / 1024), "mhs": miner.get("mhs"), "watts": miner.get("watts"), "miner_gb": gb(miner.get("own_mib", 0)),
|
||||
"stock": "refused: " + (stock.get("err") or "")[:60] if stock.get("verified") != "yes" else f"proved {stock.get('prove_s')} s at {gb(stock.get('peak_mib', 0))} GB",
|
||||
"prove_alone_gb": gb(own(alone)) if alone else None, "shard_s": secs(alone), "prove_alone_point": alone,
|
||||
|
|
@ -52,7 +60,7 @@ for iid, b in reg.items():
|
|||
if os.path.exists(ep):
|
||||
e = json.load(open(ep)); c = e["chosen"]
|
||||
r.update({"tune_w": c["watts"], "tune_clock_mhz": c["clock_mhz"], "tune_mhs": c["mhs"], "tune_mhw": c["eff"], "ladder": [{"w": s["watts"], "mhs": s["mhs"], "mhw": s["eff"], "step": s["label"]} for s in e["steps"]], "tune_plan": e["plan"]})
|
||||
rows[card] = r
|
||||
rows[f"{card} {r['vram_gb']} GB"] = r
|
||||
table.append(f"| {card} | {r['vram_gb']} | {idle} | {r['mhs']} MH/s at {r['watts']} W, {r['miner_gb']} GB | {r['stock']} | " +
|
||||
f"{r['prove_alone_gb'] or 'no'} GB, {r['shard_s'] or ''} s ({alone or 'none'}) | {r['mine_prove_gb'] or 'no'} GB peak, {r['mine_prove_s'] or ''} s | {r['core_only_gb'] or 'no'} GB, {r['core_only_s'] or ''} s | {verdict} |")
|
||||
json.dump(rows, open(f"{ROOT}/results.json", "w"), indent=1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue