Skip to content

Commit 8a78ad3

Browse files
committed
Update strict score bounds to 0.01 and 0.99 to avoid float rounding bugs
1 parent 0031c0f commit 8a78ad3

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

inference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from dataclasses import dataclass, field
1010
from typing import Any, Callable, Dict, Iterable
1111

12-
_SCORE_EPS = 0.001
12+
_SCORE_EPS = 0.01
1313

1414

1515
def _clamp_score(value: object) -> float:

server/environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
from .task_bank import Task, get_random_task
3131
from .tool_registry import ToolRegistry
3232

33-
STRICT_SCORE_EPSILON = 0.001
33+
STRICT_SCORE_EPSILON = 0.01
3434

3535

3636
def clamp_strict_score(value: float) -> float:

server/grader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Grader:
2929
def _strict_score(value: float) -> float:
3030
if not isfinite(value):
3131
return 0.5
32-
return round(max(0.001, min(value, 0.999)), 3)
32+
return round(max(0.01, min(value, 0.99)), 3)
3333

3434
def evaluate(
3535
self,

0 commit comments

Comments
 (0)