From 4953b13b0a33bff5b490c48424666ae6dc734cfd Mon Sep 17 00:00:00 2001 From: "Tarang (TJ) Jammalamadaka" Date: Tue, 27 Oct 2026 01:47:27 -0700 Subject: [PATCH] fix(eval): count a single-row PAI-Bench-C shard as pending The shard writer joined rows with "\n" and wrote no trailing newline, while the launcher counts pending rows with `wc -l`, which counts newlines. A shard with exactly one pending row therefore read as 0 and its GPU worker was skipped, leaving that video ungenerated. Terminate every row with a newline so the count matches the rows written. Diagnosis from NVIDIA/cosmos#376. Signed-off-by: Tarang (TJ) Jammalamadaka --- .../evaluation/cosmos3/generator/paibench_c/run_paibench_c.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.agents/skills/evaluation/cosmos3/generator/paibench_c/run_paibench_c.sh b/.agents/skills/evaluation/cosmos3/generator/paibench_c/run_paibench_c.sh index a9e420ea5..370aa19f0 100755 --- a/.agents/skills/evaluation/cosmos3/generator/paibench_c/run_paibench_c.sh +++ b/.agents/skills/evaluation/cosmos3/generator/paibench_c/run_paibench_c.sh @@ -609,7 +609,9 @@ for row in shard_rows: vision_mp4.unlink() pending.append(row) -shard_jsonl.write_text("\n".join(json.dumps(r) for r in pending)) +# One newline per row, including the last: the launcher below counts rows with +# `wc -l`, which counts newlines, so an unterminated one-row shard read as 0. +shard_jsonl.write_text("".join(json.dumps(r) + "\n" for r in pending)) skipped = len(shard_rows) - len(pending) print(f"Shard {shard_idx}/{num_shards}: {len(pending)} to generate, {skipped} already done") PY