Your-Mate commited on
Commit
c6e64e4
·
verified ·
1 Parent(s): f196cfa

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. env/tasks.py +3 -7
env/tasks.py CHANGED
@@ -372,13 +372,9 @@ def schema_json(task_name: str) -> str:
372
  return json.dumps(get_task(task_name).public_schema(), sort_keys=True)
373
 
374
 
375
- def _strict_open_interval(score: float, eps: float = 1e-3) -> float:
376
- """Map score into (0, 1) for external validators requiring strict bounds."""
377
- if score <= 0.0:
378
- return eps
379
- if score >= 1.0:
380
- return 1.0 - eps
381
- return score
382
 
383
 
384
  def easy_grader(candidate: Dict[str, Any]) -> float:
 
372
  return json.dumps(get_task(task_name).public_schema(), sort_keys=True)
373
 
374
 
375
+ def _strict_open_interval(score: float) -> float:
376
+ """Map score into strict (0, 1) with stable rounded output."""
377
+ return round(min(max(float(score), 0.01), 0.99), 3)
 
 
 
 
378
 
379
 
380
  def easy_grader(candidate: Dict[str, Any]) -> float: