dhfz36 commited on
Commit
8d9dcd5
·
unverified ·
1 Parent(s): 77a5de1

Clamp grader scores strictly to (0, 1) interval

Browse files
Files changed (1) hide show
  1. graders.py +3 -2
graders.py CHANGED
@@ -59,5 +59,6 @@ GRADERS = {
59
 
60
  def evaluate_history(task_id: str, history: List[Dict[str, Any]]) -> float:
61
  if task_id in GRADERS:
62
- return GRADERS[task_id](history)
63
- return 0.0
 
 
59
 
60
  def evaluate_history(task_id: str, history: List[Dict[str, Any]]) -> float:
61
  if task_id in GRADERS:
62
+ score = GRADERS[task_id](history)
63
+ return min(0.999, max(0.001, score))
64
+ return 0.001