Mihir1107 Claude Sonnet 4.6 commited on
Commit
eda8f10
·
1 Parent(s): 06d5215

Clamp grader scores to (0.001, 0.999) — validator requires strictly (0, 1)

Browse files

np.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>

Files changed (1) hide show
  1. server.py +3 -0
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,