diff --git a/bench/computer-use/run.py b/bench/computer-use/run.py index a3d1e4f..ee21dfb 100644 --- a/bench/computer-use/run.py +++ b/bench/computer-use/run.py @@ -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,