Merge branch 'bugfix/11'

bugfix(11): operate_rate must not sum a None
This commit is contained in:
Tiara Rodney 2026-06-17 23:49:27 +02:00
commit 2209ade52c
Signed by: tiara
GPG key ID: 5CD8EC1D46106723
3 changed files with 3 additions and 3 deletions

2
TODO
View file

@ -178,7 +178,7 @@ Content-Type: application/issue
ID: 11 ID: 11
Type: bugfix Type: bugfix
Title: operate_rate can sum a None (eval + resident) Title: operate_rate can sum a None (eval + resident)
Status: in-progress Status: done
Priority: medium Priority: medium
Created: 2026-06-17 Created: 2026-06-17
Module: sekft Module: sekft

View file

@ -80,7 +80,7 @@ def evaluate(base: str, adapter: str, scenarios_dir: Path, n: int,
d = len(rows) or 1 d = len(rows) or 1
return { return {
"n": len(rows), "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), "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), "verified_rate": round(sum(t.verified for t in rows) / d, 3),
"clean_rate": round(sum(t.keep for t in rows) / d, 3), "clean_rate": round(sum(t.keep for t in rows) / d, 3),

View file

@ -154,7 +154,7 @@ class Resident:
d = len(rows) or 1 d = len(rows) or 1
m = { m = {
"n": len(rows), "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), "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), "verified_rate": round(sum(t.verified for t in rows) / d, 3),
"clean_rate": round(sum(t.keep for t in rows) / d, 3), "clean_rate": round(sum(t.keep for t in rows) / d, 3),