Spaces:
Sleeping
Sleeping
Upload 4 files
Browse files- openenv.yaml +5 -0
- server/graders.py +1 -1
- server/models.py +1 -1
openenv.yaml
CHANGED
|
@@ -25,19 +25,24 @@ tasks:
|
|
| 25 |
difficulty: easy
|
| 26 |
description: "Identify column in a users table with a null rate exceeding 50 percent"
|
| 27 |
max_attempts: 1
|
|
|
|
| 28 |
- id: type_repair
|
| 29 |
difficulty: medium
|
| 30 |
description: "Detect and fix a numeric type mismatch in production transaction records"
|
| 31 |
max_attempts: 3
|
|
|
|
| 32 |
- id: dedup_bug
|
| 33 |
difficulty: hard
|
| 34 |
description: "Find and repair a duplication bug that inflates join result volumes"
|
| 35 |
max_attempts: 5
|
|
|
|
| 36 |
- id: fk_integrity
|
| 37 |
difficulty: hard
|
| 38 |
description: "Repair referential integrity drift by removing orphan child records while preserving valid invoices"
|
| 39 |
max_attempts: 4
|
|
|
|
| 40 |
- id: schema_drift
|
| 41 |
difficulty: medium
|
| 42 |
description: "Normalize drifted upstream event schemas into a canonical analytics artifact with consistent types"
|
| 43 |
max_attempts: 4
|
|
|
|
|
|
| 25 |
difficulty: easy
|
| 26 |
description: "Identify column in a users table with a null rate exceeding 50 percent"
|
| 27 |
max_attempts: 1
|
| 28 |
+
scored: true
|
| 29 |
- id: type_repair
|
| 30 |
difficulty: medium
|
| 31 |
description: "Detect and fix a numeric type mismatch in production transaction records"
|
| 32 |
max_attempts: 3
|
| 33 |
+
scored: true
|
| 34 |
- id: dedup_bug
|
| 35 |
difficulty: hard
|
| 36 |
description: "Find and repair a duplication bug that inflates join result volumes"
|
| 37 |
max_attempts: 5
|
| 38 |
+
scored: true
|
| 39 |
- id: fk_integrity
|
| 40 |
difficulty: hard
|
| 41 |
description: "Repair referential integrity drift by removing orphan child records while preserving valid invoices"
|
| 42 |
max_attempts: 4
|
| 43 |
+
scored: true
|
| 44 |
- id: schema_drift
|
| 45 |
difficulty: medium
|
| 46 |
description: "Normalize drifted upstream event schemas into a canonical analytics artifact with consistent types"
|
| 47 |
max_attempts: 4
|
| 48 |
+
scored: true
|
server/graders.py
CHANGED
|
@@ -979,7 +979,7 @@ def compute_episode_score(
|
|
| 979 |
submit_action.answer or "",
|
| 980 |
ground_truth,
|
| 981 |
)
|
| 982 |
-
score =
|
| 983 |
return SQLReward(
|
| 984 |
score=score,
|
| 985 |
step_reward=score,
|
|
|
|
| 979 |
submit_action.answer or "",
|
| 980 |
ground_truth,
|
| 981 |
)
|
| 982 |
+
score = _clamp(score)
|
| 983 |
return SQLReward(
|
| 984 |
score=score,
|
| 985 |
step_reward=score,
|
server/models.py
CHANGED
|
@@ -135,7 +135,7 @@ class SQLReward(BaseModel):
|
|
| 135 |
@classmethod
|
| 136 |
def clamp_to_unit(cls, v: float) -> float:
|
| 137 |
"""Ensure scores stay in [0.0, 1.0]."""
|
| 138 |
-
return round(max(0.
|
| 139 |
|
| 140 |
|
| 141 |
class TrajectoryStep(BaseModel):
|
|
|
|
| 135 |
@classmethod
|
| 136 |
def clamp_to_unit(cls, v: float) -> float:
|
| 137 |
"""Ensure scores stay in [0.0, 1.0]."""
|
| 138 |
+
return round(max(0.001, min(0.999, v)), 4)
|
| 139 |
|
| 140 |
|
| 141 |
class TrajectoryStep(BaseModel):
|