SmolDataEnvs-harbor-train: remove null tool_efficiency from graders (part 7)
Browse filesOn 3,331/5,000 train tasks, `test.sh` pipes `grader.py --json` to `reward.json`. Its null `tool_efficiency` (no tool-call count is written) makes Harbor reject the whole reward, correctness included, for every answered trial; only empty submissions grade as 0. The other 1,669 tasks write a plain number to `reward.txt` without `--json` and are unaffected.
This copies the already-fixed test-split `grader.py` byte for byte to all 5,000 tasks. Only `tool_efficiency` is removed; `grade()`, tolerances and normalisation stay the same. `test.sh` and all other files are unchanged.
### Testing
JSON after the change: correct `{"correctness": 1.0, "submission": 1.0}`; empty `{"correctness": 0.0, "submission": 0.0}`.
This view is limited to 50 files because it contains too many changes. See raw diff
- tasks/0048_049_48049467_qa_5/tests/grader.py +16 -25
- tasks/0048_061_48061947_qa_2/tests/grader.py +16 -25
- tasks/0048_061_48061947_qa_3/tests/grader.py +16 -25
- tasks/0048_090_48090162_qa_2/tests/grader.py +16 -25
- tasks/0048_093_48093392_qa_5/tests/grader.py +16 -25
- tasks/0048_101_48101055_qa_3/tests/grader.py +16 -25
- tasks/0048_107_48107437_qa_2/tests/grader.py +16 -25
- tasks/0048_357_48357285_qa_5/tests/grader.py +16 -25
- tasks/0048_371_48371332_qa_5/tests/grader.py +16 -25
- tasks/0048_420_48420121_qa_3/tests/grader.py +16 -25
- tasks/0048_436_48436455_qa_2/tests/grader.py +16 -25
- tasks/0048_436_48436455_qa_3/tests/grader.py +16 -25
- tasks/0048_459_48459218_qa_3/tests/grader.py +16 -25
- tasks/0048_468_48468313_qa_5/tests/grader.py +16 -25
- tasks/0048_488_48488979_qa_3/tests/grader.py +16 -25
- tasks/0048_488_48488979_qa_4/tests/grader.py +16 -25
- tasks/0048_518_48518667_qa_4/tests/grader.py +16 -25
- tasks/0048_584_48584786_qa_2/tests/grader.py +16 -25
- tasks/0048_651_48651619_qa_4/tests/grader.py +16 -25
- tasks/0048_695_48695908_qa_2/tests/grader.py +16 -25
- tasks/0048_708_48708349_qa_2/tests/grader.py +16 -25
- tasks/0048_708_48708349_qa_3/tests/grader.py +16 -25
- tasks/0048_765_48765595_qa_3/tests/grader.py +16 -25
- tasks/0048_765_48765595_qa_5/tests/grader.py +16 -25
- tasks/0048_823_48823313_qa_1/tests/grader.py +16 -25
- tasks/0048_873_48873646_qa_3/tests/grader.py +16 -25
- tasks/0048_873_48873646_qa_4/tests/grader.py +16 -25
- tasks/0048_881_48881747_qa_3/tests/grader.py +16 -25
- tasks/0048_917_48917297_qa_2/tests/grader.py +16 -25
- tasks/0048_917_48917297_qa_3/tests/grader.py +16 -25
- tasks/0048_917_48917297_qa_4/tests/grader.py +16 -25
- tasks/0048_966_48966571_qa_3/tests/grader.py +16 -25
- tasks/0048_996_48996091_qa_4/tests/grader.py +16 -25
- tasks/0049_008_49008236_qa_5/tests/grader.py +16 -25
- tasks/0049_015_49015069_qa_1/tests/grader.py +16 -25
- tasks/0049_015_49015069_qa_2/tests/grader.py +16 -25
- tasks/0049_015_49015069_qa_5/tests/grader.py +16 -25
- tasks/0049_018_49018627_qa_4/tests/grader.py +16 -25
- tasks/0049_034_49034706_qa_4/tests/grader.py +16 -25
- tasks/0049_078_49078403_qa_1/tests/grader.py +16 -25
- tasks/0049_090_49090832_qa_1/tests/grader.py +16 -25
- tasks/0049_165_49165096_qa_1/tests/grader.py +16 -25
- tasks/0049_165_49165096_qa_3/tests/grader.py +16 -25
- tasks/0049_165_49165096_qa_5/tests/grader.py +16 -25
- tasks/0049_228_49228657_qa_2/tests/grader.py +16 -25
- tasks/0049_228_49228657_qa_3/tests/grader.py +16 -25
- tasks/0049_228_49228657_qa_5/tests/grader.py +16 -25
- tasks/0049_261_49261135_qa_3/tests/grader.py +16 -25
- tasks/0049_302_49302290_qa_5/tests/grader.py +16 -25
- tasks/0049_378_49378921_qa_4/tests/grader.py +16 -25
tasks/0048_049_48049467_qa_5/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_061_48061947_qa_2/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_061_48061947_qa_3/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_090_48090162_qa_2/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_093_48093392_qa_5/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_101_48101055_qa_3/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_107_48107437_qa_2/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_357_48357285_qa_5/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_371_48371332_qa_5/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_420_48420121_qa_3/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_436_48436455_qa_2/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_436_48436455_qa_3/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_459_48459218_qa_3/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_468_48468313_qa_5/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_488_48488979_qa_3/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_488_48488979_qa_4/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_518_48518667_qa_4/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_584_48584786_qa_2/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_651_48651619_qa_4/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_695_48695908_qa_2/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_708_48708349_qa_2/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_708_48708349_qa_3/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_765_48765595_qa_3/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_765_48765595_qa_5/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_823_48823313_qa_1/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_873_48873646_qa_3/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_873_48873646_qa_4/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_881_48881747_qa_3/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_917_48917297_qa_2/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_917_48917297_qa_3/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_917_48917297_qa_4/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_966_48966571_qa_3/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0048_996_48996091_qa_4/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0049_008_49008236_qa_5/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0049_015_49015069_qa_1/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0049_015_49015069_qa_2/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0049_015_49015069_qa_5/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0049_018_49018627_qa_4/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0049_034_49034706_qa_4/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0049_078_49078403_qa_1/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0049_090_49090832_qa_1/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0049_165_49165096_qa_1/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0049_165_49165096_qa_3/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0049_165_49165096_qa_5/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0049_228_49228657_qa_2/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0049_228_49228657_qa_3/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0049_228_49228657_qa_5/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0049_261_49261135_qa_3/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0049_302_49302290_qa_5/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|
tasks/0049_378_49378921_qa_4/tests/grader.py
CHANGED
|
@@ -106,28 +106,20 @@ def grade(gold: str, candidate: str, *, question: str = "", reward_mode: str = "
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
def _tool_efficiency(n):
|
| 125 |
-
if n is None:
|
| 126 |
-
return None
|
| 127 |
-
budget = float(os.environ.get("TOOL_BUDGET", "15") or "15")
|
| 128 |
-
if budget <= 0:
|
| 129 |
-
return None
|
| 130 |
-
return max(0.0, min(1.0, 1.0 - n / budget))
|
| 131 |
|
| 132 |
|
| 133 |
def _tols():
|
|
@@ -156,12 +148,11 @@ def main_json() -> int:
|
|
| 156 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 157 |
candidate = sys.stdin.read().strip()
|
| 158 |
if not candidate:
|
| 159 |
-
print(json.dumps({"correctness": 0.0, "submission": 0.0
|
| 160 |
return 0
|
| 161 |
at, rt = _tols()
|
| 162 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 163 |
-
|
| 164 |
-
print(json.dumps({"correctness": float(r.reward), "submission": 1.0, "tool_efficiency": _tool_efficiency(n)}))
|
| 165 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 166 |
return 0
|
| 167 |
|
|
|
|
| 106 |
return GradeResult(0.0, "miss")
|
| 107 |
|
| 108 |
|
| 109 |
+
# TOOL EFFICIENCY IS NOT COMPUTED HERE, AND CANNOT BE.
|
| 110 |
+
#
|
| 111 |
+
# This grader used to emit a `tool_efficiency` key derived from a tool-call count it read from
|
| 112 |
+
# `/workdir/.n_tool_calls` or `$N_TOOL_CALLS`. Nothing writes that file and no task.toml sets that
|
| 113 |
+
# variable, so the count was always None, the key was always null, and Harbor's reward model
|
| 114 |
+
# (`dict[str, float | int]`) rejected the WHOLE dict -- taking `correctness` down with it. The only
|
| 115 |
+
# path that survived was the empty-submission branch below, so the suite graded failures correctly
|
| 116 |
+
# and crashed on every successful answer. That silently removed 86 of 250 tasks from scoring.
|
| 117 |
+
#
|
| 118 |
+
# The count is not the sandbox's to know: it lives in the capture proxy, which sees every model call.
|
| 119 |
+
# A reward belongs in the verifier only if the sandbox is what makes it computable. Correctness needs
|
| 120 |
+
# the data, the gold answer and the tolerances -- it belongs here. Tool efficiency needs a trace --
|
| 121 |
+
# it belongs to whoever holds the trace, and it is computed there as a shaping term, gated on
|
| 122 |
+
# correctness so that "made no tool calls" can never outscore solving the task.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
def _tols():
|
|
|
|
| 148 |
question = (os.environ.get("QUESTION") or "").strip()
|
| 149 |
candidate = sys.stdin.read().strip()
|
| 150 |
if not candidate:
|
| 151 |
+
print(json.dumps({"correctness": 0.0, "submission": 0.0}))
|
| 152 |
return 0
|
| 153 |
at, rt = _tols()
|
| 154 |
r = grade(gold, candidate, question=question, reward_mode=os.environ.get("REWARD_MODE", "") or "", abs_tol=at, rel_tol=rt)
|
| 155 |
+
print(json.dumps({"correctness": float(r.reward), "submission": 1.0}))
|
|
|
|
| 156 |
print(f"[grader] gold={gold!r} pred={candidate[:80]!r} correctness={r.reward} method={r.method}", file=sys.stderr)
|
| 157 |
return 0
|
| 158 |
|