25 lines
1.3 KiB
Python
25 lines
1.3 KiB
Python
"""一次性诊断:轨迹到底有没有、agent 侧依赖齐不齐。scp 到机器上跑,不进 git 主流程。"""
|
||
import glob
|
||
import os
|
||
import shutil
|
||
import sqlite3
|
||
|
||
DB = "/home/ming01.wang/bench-state/jobs.sqlite"
|
||
R = "/mnt/data/ming01.wang/model-compile-hbdk/bench"
|
||
|
||
c = sqlite3.connect(DB)
|
||
c.execute("PRAGMA busy_timeout=30000")
|
||
print("rollouts by state:", dict(c.execute("select state,count(*) from rollouts group by 1").fetchall()))
|
||
print("rollouts executed (turns not null):", c.execute("select count(*) from rollouts where turns is not null").fetchone()[0])
|
||
print("verdict rows:", c.execute("select count(*) from rollouts where verdict is not null").fetchone()[0])
|
||
print("jobs by state:", dict(c.execute("select state,count(*) from jobs group by 1").fetchall()))
|
||
print("datasets/:", os.listdir(R + "/datasets") if os.path.isdir(R + "/datasets") else "-")
|
||
print("rollout dirs on disk:", len(glob.glob(R + "/runs/*/*/rollouts/*")))
|
||
print("events.jsonl on disk:", len(glob.glob(R + "/runs/*/*/rollouts/*/agent/events.jsonl")))
|
||
for b in ("pi", "node", "npm", "npx"):
|
||
print(f" {b} -> {shutil.which(b) or 'NOT FOUND'}")
|
||
od = os.path.expanduser("~/.opencode/bin")
|
||
print("~/.opencode/bin:", os.listdir(od) if os.path.isdir(od) else "-")
|
||
pi = os.path.expanduser("~/.pi")
|
||
print("~/.pi:", os.listdir(pi) if os.path.isdir(pi) else "NOT FOUND")
|