Avoid shell variable collision in bench parser
This commit is contained in:
1 parent
56ee7cca45
commit
babc823f11
1 file changed
+2
-2
@@ -150,7 +150,7 @@ run_one() {
|
|||||||
echo "--- run ${r}/${runs} ---"
|
echo "--- run ${r}/${runs} ---"
|
||||||
python3 - "$ubatch" "$port" "$out_tokens" "$CTX" "$log" "$r" <<'PY'
|
python3 - "$ubatch" "$port" "$out_tokens" "$CTX" "$log" "$r" <<'PY'
|
||||||
import sys, time, json, urllib.request
|
import sys, time, json, urllib.request
|
||||||
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]
|
ubatch, port, out_tokens, ctx, log, run_number = 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.
|
# Flowing prose at ~75% of ctx so MTP acceptance is realistic.
|
||||||
VAR = (
|
VAR = (
|
||||||
@@ -210,7 +210,7 @@ if evals and ct:
|
|||||||
if match:
|
if match:
|
||||||
ms = float(match.group(1))
|
ms = float(match.group(1))
|
||||||
g_tps = f"{ct / (ms / 1000):.2f}"
|
g_tps = f"{ct / (ms / 1000):.2f}"
|
||||||
print(f"== RESULT ubatch={ubatch} run={run} "
|
print(f"== RESULT ubatch={ubatch} run={run_number} "
|
||||||
f"PREFILL={grab(prefill)} GEN_TPS={g_tps} "
|
f"PREFILL={grab(prefill)} GEN_TPS={g_tps} "
|
||||||
f"pt={pt} ct={ct} wall={dt:.1f}s")
|
f"pt={pt} ct={ct} wall={dt:.1f}s")
|
||||||
PY
|
PY
|
||||||
|
|||||||
Reference in new issue
Block a user