diff --git a/src/tiararodney/sekft/eval.py b/src/tiararodney/sekft/eval.py index 59f5bfe..5d5964c 100644 --- a/src/tiararodney/sekft/eval.py +++ b/src/tiararodney/sekft/eval.py @@ -80,7 +80,7 @@ def evaluate(base: str, adapter: str, scenarios_dir: Path, n: int, d = len(rows) or 1 return { "n": len(rows), - "operate_rate": round(sum(t.steps > 0 and t.meta.get("clean") for t in rows) / d, 3), + "operate_rate": round(sum(bool(t.steps > 0 and t.meta.get("clean")) for t in rows) / d, 3), "terminate_rate": round(sum(t.terminal in ("exit", "panic") for t in rows) / d, 3), "verified_rate": round(sum(t.verified for t in rows) / d, 3), "clean_rate": round(sum(t.keep for t in rows) / d, 3), diff --git a/src/tiararodney/sekft/resident.py b/src/tiararodney/sekft/resident.py index 3b0b8e0..2d7bc3b 100644 --- a/src/tiararodney/sekft/resident.py +++ b/src/tiararodney/sekft/resident.py @@ -154,7 +154,7 @@ class Resident: d = len(rows) or 1 m = { "n": len(rows), - "operate_rate": round(sum(t.steps > 0 and t.meta.get("clean") for t in rows) / d, 3), + "operate_rate": round(sum(bool(t.steps > 0 and t.meta.get("clean")) for t in rows) / d, 3), "terminate_rate": round(sum(t.terminal in ("exit", "panic") for t in rows) / d, 3), "verified_rate": round(sum(t.verified for t in rows) / d, 3), "clean_rate": round(sum(t.keep for t in rows) / d, 3),