Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- inference.py +3 -1
inference.py
CHANGED
|
@@ -179,7 +179,9 @@ def run_task(task_id: str, client: OpenAI | None) -> float:
|
|
| 179 |
grader_data = _safe_json(
|
| 180 |
"GET", f"{ENV_BASE_URL}/grader?task_id={task_id}&episode_id={episode_id}"
|
| 181 |
)
|
| 182 |
-
|
|
|
|
|
|
|
| 183 |
success = score >= SUCCESS_SCORE_THRESHOLD
|
| 184 |
except Exception as exc:
|
| 185 |
last_error = str(exc)
|
|
|
|
| 179 |
grader_data = _safe_json(
|
| 180 |
"GET", f"{ENV_BASE_URL}/grader?task_id={task_id}&episode_id={episode_id}"
|
| 181 |
)
|
| 182 |
+
grader_score = float(grader_data.get("score", 0.0) or 0.0)
|
| 183 |
+
step_score = rewards[-1] if rewards else 0.0
|
| 184 |
+
score = max(grader_score, step_score)
|
| 185 |
success = score >= SUCCESS_SCORE_THRESHOLD
|
| 186 |
except Exception as exc:
|
| 187 |
last_error = str(exc)
|