From 31a21631b85363c511fa55e411f6b490211666b6 Mon Sep 17 00:00:00 2001 From: yy-fighting Date: Tue, 21 Jul 2026 10:04:26 +0000 Subject: [PATCH] =?UTF-8?q?fix(parse=5Fresults):=20=E4=B8=8D=E5=86=8D?= =?UTF-8?q?=E6=8A=8A=20raw=5Frequests=20=E5=B5=8C=E5=85=A5=20results.json?= =?UTF-8?q?=EF=BC=8C=E9=81=BF=E5=85=8D=208.5MB=20=E8=86=A8=E8=83=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit parse_jsonl 当 raw 文件是单个聚合 JSON 对象时返回 [data](整个聚合含 itls/generated_texts 数组),原代码把它当 raw_requests[:100] 塞进 scenario, 导致单次 bench 的 results.json 膨胀到 12.5MB(itls 6.95MB + generated_texts 1.54MB)。 而真正有用的聚合百分位已在 latencies 字段(~0.5KB),逐请求原始数据已在 raw_outputs/*.jsonl,raw_requests 字段纯冗余。 - 移除 scenario dict 的 raw_requests 字段; parse_jsonl 返回值改用 _ 接收 - 符合 BENCHMARK_WORKFLOW.md: 产生大量请求时逐请求数据存 raw_outputs, results.json 只留聚合百分位 - 实测 qwen3_235b results.json: 12.52MB -> ~KB - 同步修改 4 份相同 md5 的 parse_results.py(本提交含 3 份 tracked; qwen3_8b 未跟踪待随实验提交) Co-Authored-By: Claude Fable 5 --- experiments/p800/dsv4_p800_256k_4k_probe/parse_results.py | 3 +-- experiments/p800/dsv4_p800_sglang/parse_results.py | 3 +-- experiments/p800/qwen3_235b_p800_sglang_tp8/parse_results.py | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/experiments/p800/dsv4_p800_256k_4k_probe/parse_results.py b/experiments/p800/dsv4_p800_256k_4k_probe/parse_results.py index 341f69e..a533f51 100755 --- a/experiments/p800/dsv4_p800_256k_4k_probe/parse_results.py +++ b/experiments/p800/dsv4_p800_256k_4k_probe/parse_results.py @@ -212,7 +212,7 @@ def parse_scenario(result_root: Path, raw_file: Path) -> dict | None: if log_file.exists(): summary = parse_summary_log(log_file.read_text(encoding="utf-8", errors="replace")) - raw_requests, aggregates = parse_jsonl(raw_file) + _, aggregates = parse_jsonl(raw_file) # For newer sglang aggregate JSON, success/failed are not present in the # raw output file. Override them from the human-readable summary log when @@ -238,7 +238,6 @@ def parse_scenario(result_root: Path, raw_file: Path) -> dict | None: "total_token_throughput": summary.get("total_token_throughput"), "accept_length": None, "latencies": aggregates["latencies"], - "raw_requests": raw_requests[:100] if len(raw_requests) <= 100 else None, } return scenario diff --git a/experiments/p800/dsv4_p800_sglang/parse_results.py b/experiments/p800/dsv4_p800_sglang/parse_results.py index 341f69e..a533f51 100755 --- a/experiments/p800/dsv4_p800_sglang/parse_results.py +++ b/experiments/p800/dsv4_p800_sglang/parse_results.py @@ -212,7 +212,7 @@ def parse_scenario(result_root: Path, raw_file: Path) -> dict | None: if log_file.exists(): summary = parse_summary_log(log_file.read_text(encoding="utf-8", errors="replace")) - raw_requests, aggregates = parse_jsonl(raw_file) + _, aggregates = parse_jsonl(raw_file) # For newer sglang aggregate JSON, success/failed are not present in the # raw output file. Override them from the human-readable summary log when @@ -238,7 +238,6 @@ def parse_scenario(result_root: Path, raw_file: Path) -> dict | None: "total_token_throughput": summary.get("total_token_throughput"), "accept_length": None, "latencies": aggregates["latencies"], - "raw_requests": raw_requests[:100] if len(raw_requests) <= 100 else None, } return scenario diff --git a/experiments/p800/qwen3_235b_p800_sglang_tp8/parse_results.py b/experiments/p800/qwen3_235b_p800_sglang_tp8/parse_results.py index 341f69e..a533f51 100755 --- a/experiments/p800/qwen3_235b_p800_sglang_tp8/parse_results.py +++ b/experiments/p800/qwen3_235b_p800_sglang_tp8/parse_results.py @@ -212,7 +212,7 @@ def parse_scenario(result_root: Path, raw_file: Path) -> dict | None: if log_file.exists(): summary = parse_summary_log(log_file.read_text(encoding="utf-8", errors="replace")) - raw_requests, aggregates = parse_jsonl(raw_file) + _, aggregates = parse_jsonl(raw_file) # For newer sglang aggregate JSON, success/failed are not present in the # raw output file. Override them from the human-readable summary log when @@ -238,7 +238,6 @@ def parse_scenario(result_root: Path, raw_file: Path) -> dict | None: "total_token_throughput": summary.get("total_token_throughput"), "accept_length": None, "latencies": aggregates["latencies"], - "raw_requests": raw_requests[:100] if len(raw_requests) <= 100 else None, } return scenario