Pass run number into ubatch benchmark parser

This commit is contained in:
Frank
2026-08-25 17:12:51 -07:00
parent c072c75fa9
commit 56ee7cca45
+3 -3
View File
@@ -148,9 +148,9 @@ run_one() {
local r
for r in $(seq 1 "$runs"); do
echo "--- run ${r}/${runs} ---"
python3 - "$ubatch" "$port" "$out_tokens" "$CTX" "$log" <<'PY'
python3 - "$ubatch" "$port" "$out_tokens" "$CTX" "$log" "$r" <<'PY'
import sys, time, json, urllib.request
ubatch, port, out_tokens, ctx, log = sys.argv[1], sys.argv[2], int(sys.argv[3]), int(sys.argv[4]), sys.argv[5]
ubatch, port, out_tokens, ctx, log, run = sys.argv[1], sys.argv[2], int(sys.argv[3]), int(sys.argv[4]), sys.argv[5], sys.argv[6]
# Flowing prose at ~75% of ctx so MTP acceptance is realistic.
VAR = (
@@ -210,7 +210,7 @@ if evals and ct:
if match:
ms = float(match.group(1))
g_tps = f"{ct / (ms / 1000):.2f}"
print(f"== RESULT ubatch={ubatch} run={r} "
print(f"== RESULT ubatch={ubatch} run={run} "
f"PREFILL={grab(prefill)} GEN_TPS={g_tps} "
f"pt={pt} ct={ct} wall={dt:.1f}s")
PY