Spaces:
Sleeping
Sleeping
Clamp grader scores to (0.001, 0.999) — validator requires strictly (0, 1)
Browse filesnp.clip(..., 0.0, 1.0) allowed exact 0.0 or 1.0 which failed the
Phase 2 deep validation check "score strictly between 0 and 1".
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
server.py
CHANGED
|
@@ -240,6 +240,9 @@ def _grade(task_id: str, obs: Observation, noise_ratios: list, cfg: dict) -> Gra
|
|
| 240 |
"budget_used": int(budget_used),
|
| 241 |
}
|
| 242 |
|
|
|
|
|
|
|
|
|
|
| 243 |
return GraderResponse(
|
| 244 |
episode_id=store.episode_id,
|
| 245 |
task_id=task_id,
|
|
|
|
| 240 |
"budget_used": int(budget_used),
|
| 241 |
}
|
| 242 |
|
| 243 |
+
# Validator requires score strictly in (0, 1) — clamp away from exact endpoints
|
| 244 |
+
score = float(np.clip(score, 0.001, 0.999))
|
| 245 |
+
|
| 246 |
return GraderResponse(
|
| 247 |
episode_id=store.episode_id,
|
| 248 |
task_id=task_id,
|