Spaces:
Sleeping
Sleeping
Clamp grader scores strictly to (0, 1) interval
Browse files- 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 |
-
|
| 63 |
-
|
|
|
|
|
|
| 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
|