Spaces:
Sleeping
Sleeping
Update server/my_env_environment.py
#3
by Dishamharitasa - opened
No description provided.
This PR fixes validation errors caused by task scores being returned as 0.0 or 1.0, which violates the OpenEnv requirement that scores must be strictly within the range (0, 1).
- Changes Made
Introduced a helper function:
def fix_score(score: float) -> float:
return max(0.01, min(0.99, score))
Applied fix_score() across:
_task_score_base
_compute_task_score
_build_observation (for both task_score and reward)
Replaced all min(1.0, score) and max(0.0, ...) patterns with safe clamping using fix_score.
prarthana-rameshraj changed pull request status to merged