Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files
judge.py
CHANGED
|
@@ -352,7 +352,7 @@ def grade(
|
|
| 352 |
details["syntax_error"] = syntax_error
|
| 353 |
|
| 354 |
if not syntax_ok:
|
| 355 |
-
return 0.
|
| 356 |
|
| 357 |
# ββ Stage 2: execution βββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 358 |
exec_ok, rows, exec_error = execute_query(task.schema_ddl, agent_query)
|
|
@@ -448,7 +448,7 @@ def grade(
|
|
| 448 |
# Low row accuracy β stay near deterministic
|
| 449 |
final_score = min(deterministic_score, ai_score * 0.6)
|
| 450 |
|
| 451 |
-
final_score = max(0.
|
| 452 |
|
| 453 |
feedback = (
|
| 454 |
f"[Rows] {row_feedback} "
|
|
|
|
| 352 |
details["syntax_error"] = syntax_error
|
| 353 |
|
| 354 |
if not syntax_ok:
|
| 355 |
+
return 0.001, f"Syntax error: {syntax_error}", details
|
| 356 |
|
| 357 |
# ββ Stage 2: execution βββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 358 |
exec_ok, rows, exec_error = execute_query(task.schema_ddl, agent_query)
|
|
|
|
| 448 |
# Low row accuracy β stay near deterministic
|
| 449 |
final_score = min(deterministic_score, ai_score * 0.6)
|
| 450 |
|
| 451 |
+
final_score = max(0.001, min(0.999, final_score))
|
| 452 |
|
| 453 |
feedback = (
|
| 454 |
f"[Rows] {row_feedback} "
|