Spaces:
Sleeping
Sleeping
Commit History
-
Bulletproof _safe_score for all bad inputs (None, NaN, strings, bool)
log_step and log_end now route every reward/score through _safe_score which handles: None, NaN, inf, empty string, non-numeric string, bool, negative, >1. All map to the closed range [0.05, 0.95] — strictly in (0, 1). Also added catch-alls in run_episode and main() so if the env or LLM client crashes at any point, every task still emits a valid [START]/[STEP]/[END] block with score in (0, 1).2014920 -
Defensive score clamping at all emission points
Every reward/score emitted by inference.py is now clamped to [0.05, 0.95] via _clamp_score() before logging. This closes multiple paths that could leak exact 0.0 or 1.0: - Initial score default was 0.0 (would emit on early reset failure) - Exception path logged reward=0.0 and appended 0.0 to rewards list - env.reset() failure wasn't wrapped in its own try/except Also bumped grade_response epsilon from 0.01 to 0.05 and aligned openenv.yaml reward.range to [0.0, 1.0].263261a -
Widen score epsilon to 0.01 so :.3f formatting stays in (0, 1)
The validator parses score=X.XXX from the [END] line of inference.py stdout. With eps=1e-9 and :.3f formatting, scores rounded to "0.000" or "1.000" which the validator reads as exactly 0.0 or 1.0. Using eps=0.01 guarantees the formatted score is always strictly between 0.010 and 0.990.ba69b5f -
Fix reward.value to always be task_score in (0,1) exclusive
The validator checks reward.value from /step responses. Previously this was the RL reward (compute_reward) which could be exactly 1.0 on first-attempt success or negative on failure. Now reward.value = task_score (clamped to (eps, 1-eps) in grade_response). The RL reward is preserved in info.rl_reward for bandit training. Also corrects reward_range in /env/info to [0.0, 1.0].b86d426 -
Fix task scores to be strictly in (0, 1) exclusive per OpenEnv spec
Clamp all grader outputs in grade_response() and inference.py score calculation using epsilon bounds to satisfy validator requirement that scores must not be exactly 0.0 or 1.0.d2d92b8 -
Initial submission: SQL Agent OpenEnv for Meta+HF hackathon
3c665d2