test: 電腦操作量測每題清掉看圖描述,並記下請別的模型描述了幾張

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uirha4mzWbjJAWAsDVuBun
This commit is contained in:
王性驊 2026-11-15 20:00:06 +08:00
parent 9c84ec69c5
commit 8d24a0fb8a
1 changed files with 9 additions and 1 deletions

View File

@ -426,7 +426,9 @@ def main():
for name in ["chats", "oplog"] + (["skills"] if skills else []):
shutil.rmtree(os.path.join(a.data, name), ignore_errors=True)
for name in os.listdir(a.data):
if name.startswith("memory.db"):
# The 看圖小幫手's notes too (a model that can't see pictures has them described): each
# task's pictures are described anew, and counted.
if name.startswith("memory.db") or name == "image-notes.json":
os.remove(os.path.join(a.data, name))
forget(skills=True)
# A box of its own that doesn't exist yet: one plain question first makes it (the first task's
@ -482,6 +484,12 @@ def main():
r["check_error"] = str(e)
r["skills"] = [{"name": k.get("name"), "steps": len(k.get("steps", []))} for k in st.get("skills", [])]
r["replayed"] = "replay_skill" in r.get("tools", [])
# Pictures another model described for this one (it can't see them): their cost isn't in
# the meter's count, which is the bot's own model only.
try:
r["described"] = len(json.load(open(os.path.join(a.data, "image-notes.json"))))
except (OSError, ValueError):
r["described"] = 0
if meter:
r["usage"] = meter.take()
r.update({"id": t["id"], "name": t["name"], "expected_route": t["route"], "ok": ok, "run": run + 1, "label": a.label,