File size: 1,285 Bytes
c045cca | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #!/usr/bin/env python3
from __future__ import annotations
import csv
import pathlib
from collections import Counter
base = pathlib.Path("Biomanus/experiments/execution_audit")
final = base / "domain_env_reaudit_10pct_cached_continuation_20260713_final_repaired/final_tool_execution_rows.csv"
fail = [r for r in csv.DictReader(final.open()) if r["ok"].lower() != "true"]
print("failed tools", len(fail), "servers", len({(r["category"], r["server"]) for r in fail}))
print("by server")
for (cat, server), n in Counter((r["category"], r["server"]) for r in fail).most_common():
print(cat, server, n)
roots = [
base / "domain_env_reaudit_10pct_cached_continuation_20260713",
base / "domain_env_reaudit_10pct_cached_continuation_20260713_repair16",
]
details = {}
for root in roots:
for p in root.glob("*/*/*_tool_fixture_reaudit.csv"):
for r in csv.DictReader(p.open()):
details[(r.get("category"), r.get("server"), r.get("tool"))] = (p, r)
print("\nexamples detail")
for r in fail:
key = (r["category"], r["server"], r["tool"])
p, d = details.get(key, (None, {}))
print("---", key, "file", p)
print("err", d.get("error_type"), "kwargs", (d.get("kwargs") or "")[:300])
print((d.get("stderr") or "")[:1200].replace("\n", " | "))
|