- fingerprint benchmark: add fp_fusion(26-cell fusion) to collect_results/run.py - run_llmmap.py: default model path to evalstone built-in model_library - add model libraries (llmdetector 11 refs / fp_fusion 8 fusion refs / llmmap templates 60 models incl 8 new: GLM-5.2/5.3, DeepSeek-Flash/Pro/ Flash-0731, Kimi-K3, MiniMax-M2.7, TianGong-Taie) - add fp_fusion engine (battery/engine/scorer) + docs - gitignore: exclude binary model weights and temp backups
32 lines
1.3 KiB
Python
32 lines
1.3 KiB
Python
#!/usr/bin/env python3
|
|
"""benchmarker.db -> CSV/JSON 转换器
|
|
用法: python3 db2report.py [db路径] # 缺省取 llm_verify 最新 seed 目录的 db
|
|
输出: 与 db 同目录下 benchmarker.csv / benchmarker.json
|
|
"""
|
|
import csv, json, os, sqlite3, sys, glob
|
|
|
|
db = sys.argv[1] if len(sys.argv) > 1 else sorted(
|
|
glob.glob("/opt/evalscope/output/*/llm_verify/seed_*/benchmarker.db"))[-1]
|
|
out_base = os.path.splitext(db)[0]
|
|
|
|
con = sqlite3.connect(db); con.row_factory = sqlite3.Row
|
|
rows = con.execute("""
|
|
SELECT br.id, bu.name AS run_name, bu.prompt_suite, br.model_name,
|
|
br.prompt_category, br.prompt_text, br.response_text,
|
|
br.error_message, br.latency_ms, br.prompt_tokens,
|
|
br.completion_tokens, br.total_tokens, br.created_at
|
|
FROM benchmark_results br JOIN benchmark_runs bu ON br.benchmark_run_id = bu.id
|
|
ORDER BY br.id""").fetchall()
|
|
recs = [dict(r) for r in rows]
|
|
|
|
with open(out_base + ".csv", "w", newline="", encoding="utf-8-sig") as f:
|
|
w = csv.DictWriter(f, fieldnames=list(recs[0].keys()))
|
|
w.writeheader(); w.writerows(recs)
|
|
|
|
with open(out_base + ".json", "w", encoding="utf-8") as f:
|
|
json.dump(recs, f, ensure_ascii=False, indent=2)
|
|
|
|
print(f"共 {len(recs)} 条记录")
|
|
print(f" CSV : {out_base}.csv (utf-8-sig, Excel 直接双击可开)")
|
|
print(f" JSON: {out_base}.json")
|