Spaces:
Sleeping
Sleeping
Commit Β·
ddbc734
1
Parent(s): d32c1b8
update score
Browse files- environment.py +3 -0
- inference.py +4 -2
environment.py
CHANGED
|
@@ -1425,6 +1425,9 @@ class OpenEnvAuctioneer:
|
|
| 1425 |
_ctx_cov = 0
|
| 1426 |
_div_mult = 1.0
|
| 1427 |
|
|
|
|
|
|
|
|
|
|
| 1428 |
return Info(
|
| 1429 |
task_id = self.task_id,
|
| 1430 |
current_step = self._step,
|
|
|
|
| 1425 |
_ctx_cov = 0
|
| 1426 |
_div_mult = 1.0
|
| 1427 |
|
| 1428 |
+
# Clamp task_score to strictly (0, 1) β validator rejects 0.0 and 1.0
|
| 1429 |
+
task_score = float(np.clip(task_score, 0.001, 0.999))
|
| 1430 |
+
|
| 1431 |
return Info(
|
| 1432 |
task_id = self.task_id,
|
| 1433 |
current_step = self._step,
|
inference.py
CHANGED
|
@@ -391,7 +391,9 @@ async def run_task(task_id: str, image_name: Optional[str] = None,
|
|
| 391 |
if result.done:
|
| 392 |
break
|
| 393 |
|
| 394 |
-
score = result.info.get("task_score", 0.
|
|
|
|
|
|
|
| 395 |
success = score >= SUCCESS_THRESHOLDS.get(task_id, 0.5)
|
| 396 |
|
| 397 |
except Exception as exc:
|
|
@@ -439,7 +441,7 @@ async def main() -> None:
|
|
| 439 |
print(f"[DEBUG] Task {t} failed with exception: {exc}", flush=True)
|
| 440 |
import traceback
|
| 441 |
traceback.print_exc()
|
| 442 |
-
scores[t] = 0.0
|
| 443 |
|
| 444 |
# ββ Summary ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 445 |
print("\n" + "=" * 52)
|
|
|
|
| 391 |
if result.done:
|
| 392 |
break
|
| 393 |
|
| 394 |
+
score = result.info.get("task_score", 0.001) if isinstance(result.info, dict) else 0.001
|
| 395 |
+
# Clamp score to strictly (0, 1) β validator rejects 0.0 and 1.0
|
| 396 |
+
score = max(0.001, min(0.999, score))
|
| 397 |
success = score >= SUCCESS_THRESHOLDS.get(task_id, 0.5)
|
| 398 |
|
| 399 |
except Exception as exc:
|
|
|
|
| 441 |
print(f"[DEBUG] Task {t} failed with exception: {exc}", flush=True)
|
| 442 |
import traceback
|
| 443 |
traceback.print_exc()
|
| 444 |
+
scores[t] = 0.001 # Use 0.001 instead of 0.0 β validator requires strictly (0, 1)
|
| 445 |
|
| 446 |
# ββ Summary ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 447 |
print("\n" + "=" * 52)
|