Spaces:
Running
Running
Update base grader
Browse files
server/graders/base_grader.py
CHANGED
|
@@ -33,8 +33,8 @@ class BaseGrader(ABC):
|
|
| 33 |
raise NotImplementedError
|
| 34 |
|
| 35 |
def _clamp(self, value: float) -> float:
|
| 36 |
-
"""Clamp score to valid range
|
| 37 |
-
return round(max(0.
|
| 38 |
|
| 39 |
def _get_actions_of_type(
|
| 40 |
self, state: EpisodeState, action_type: str
|
|
|
|
| 33 |
raise NotImplementedError
|
| 34 |
|
| 35 |
def _clamp(self, value: float) -> float:
|
| 36 |
+
"""Clamp score to valid range (0.0, 1.0) — strictly between 0 and 1."""
|
| 37 |
+
return round(max(0.0001, min(0.9999, value)), 4)
|
| 38 |
|
| 39 |
def _get_actions_of_type(
|
| 40 |
self, state: EpisodeState, action_type: str
|