subhdotsol commited on
Commit
4664ce2
·
1 Parent(s): 90fb130

feat(graders): add 0.0-1.0 clamp and round to easy_grader output

Browse files
Files changed (1) hide show
  1. graders/easy_grader.py +4 -1
graders/easy_grader.py CHANGED
@@ -8,4 +8,7 @@ def grade_easy(history: list[dict]) -> float:
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
 
 
 
 
8
 
9
  success_rates = [h.get("attack_success_estimate", 0.0) for h in history]
10
  max_success = max(success_rates)
11
+
12
+ # 0.0 - 1.0 clamp and round
13
+ score = min(1.0, max(0.0, max_success))
14
+ return round(score, 4)