Spaces:
Sleeping
Sleeping
Commit ·
90fb130
1
Parent(s): 5abe068
feat(graders): implement easy_grader — pure attack success rate scoring
Browse files- graders/easy_grader.py +6 -2
graders/easy_grader.py
CHANGED
|
@@ -3,5 +3,9 @@ Easy Grader — Pure Success Rate
|
|
| 3 |
Evaluates only if the attacker reached the breakthrough threshold.
|
| 4 |
"""
|
| 5 |
def grade_easy(history: list[dict]) -> float:
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
Evaluates only if the attacker reached the breakthrough threshold.
|
| 4 |
"""
|
| 5 |
def grade_easy(history: list[dict]) -> float:
|
| 6 |
+
if not history:
|
| 7 |
+
return 0.0
|
| 8 |
+
|
| 9 |
+
success_rates = [h.get("attack_success_estimate", 0.0) for h in history]
|
| 10 |
+
max_success = max(success_rates)
|
| 11 |
+
return max_success
|