Spaces:
Sleeping
Sleeping
Commit Β·
95c7542
1
Parent(s): b4cf41e
again changed
Browse files- env/graders.py +2 -2
env/graders.py
CHANGED
|
@@ -161,7 +161,7 @@ def grade_easy(action: Action, ground_truth: dict) -> tuple[float, dict, str]:
|
|
| 161 |
feedback_parts.append("Fix is incorrect or not provided.")
|
| 162 |
|
| 163 |
score += fix_score
|
| 164 |
-
breakdown["fix_correctness"] = round(fix_score, 4)
|
| 165 |
|
| 166 |
# ββ 2. Error location (0.15) βββββββββββββββββββββββββββββββββ
|
| 167 |
submitted_location = _safe_get(payload, "error_location", "")
|
|
@@ -240,7 +240,7 @@ def grade_medium(action: Action, ground_truth: dict) -> tuple[float, dict, str]:
|
|
| 240 |
feedback_parts.append("Fix is incorrect or missing.")
|
| 241 |
|
| 242 |
score += fix_score
|
| 243 |
-
breakdown["fix_correctness"] = round(fix_score, 4)
|
| 244 |
|
| 245 |
# ββ 2. Identifies the logic flaw (0.20) ββββββββββββββββββββββ
|
| 246 |
explanation = str(_safe_get(payload, "explanation", "") or _safe_get(payload, "change_made", "") or "")
|
|
|
|
| 161 |
feedback_parts.append("Fix is incorrect or not provided.")
|
| 162 |
|
| 163 |
score += fix_score
|
| 164 |
+
breakdown["fix_correctness"] = round(max(min(fix_score, 0.999), 0.001), 4)
|
| 165 |
|
| 166 |
# ββ 2. Error location (0.15) βββββββββββββββββββββββββββββββββ
|
| 167 |
submitted_location = _safe_get(payload, "error_location", "")
|
|
|
|
| 240 |
feedback_parts.append("Fix is incorrect or missing.")
|
| 241 |
|
| 242 |
score += fix_score
|
| 243 |
+
breakdown["fix_correctness"] = round(max(min(fix_score, 0.999), 0.001), 4)
|
| 244 |
|
| 245 |
# ββ 2. Identifies the logic flaw (0.20) ββββββββββββββββββββββ
|
| 246 |
explanation = str(_safe_get(payload, "explanation", "") or _safe_get(payload, "change_made", "") or "")
|