Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- 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
|
| 376 |
-
"""Map score into (0, 1)
|
| 377 |
-
|
| 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:
|