Rename to FineEnvs/openai-math; update download command, registry name and NOTICE
Browse files- NOTICE +2 -2
- README.md +3 -3
- generator/openai_math_harbor/adapter.py +2 -2
- generator/openai_math_harbor/attacks.py +1 -1
- generator/openai_math_harbor/report.py +6 -1
- generator/openai_math_harbor/templates/NOTICE +2 -2
- generator/openai_math_harbor/templates/dataset_README.md +3 -3
- registry.json +1 -1
NOTICE
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
-
openai-math
|
| 2 |
-
===========
|
| 3 |
|
| 4 |
This dataset packages the Lean statements of OpenAI's "openai/math" release as Harbor tasks.
|
| 5 |
|
|
|
|
| 1 |
+
openai-math
|
| 2 |
+
===========
|
| 3 |
|
| 4 |
This dataset packages the Lean statements of OpenAI's "openai/math" release as Harbor tasks.
|
| 5 |
|
README.md
CHANGED
|
@@ -66,7 +66,7 @@ as one end of that design space.
|
|
| 66 |
|
| 67 |
- `tasks/` — one Harbor task per validated problem: instruction, Lean statement, sandbox image recipe,
|
| 68 |
verifier and oracle
|
| 69 |
-
- `registry.json` — Harbor registry entry (`openai-math
|
| 70 |
- `manifest.parquet` — one row per task: field, family, theorem names, reference-proof size, oracle
|
| 71 |
result
|
| 72 |
- `generator/` — the code that builds the sandbox image and regenerates the tasks from openai/math
|
|
@@ -79,8 +79,8 @@ credentials for the agent you run.
|
|
| 79 |
|
| 80 |
```bash
|
| 81 |
pip install "harbor[daytona]>=0.24" daytona
|
| 82 |
-
hf download FineEnvs/openai-math
|
| 83 |
-
cd openai-math
|
| 84 |
|
| 85 |
# Build the shared sandbox image once (Lean 4, Mathlib, Comparator; ~9 GB, about an hour).
|
| 86 |
(cd generator && python -m openai_math_harbor.snapshot)
|
|
|
|
| 66 |
|
| 67 |
- `tasks/` — one Harbor task per validated problem: instruction, Lean statement, sandbox image recipe,
|
| 68 |
verifier and oracle
|
| 69 |
+
- `registry.json` — Harbor registry entry (`openai-math@1.0`)
|
| 70 |
- `manifest.parquet` — one row per task: field, family, theorem names, reference-proof size, oracle
|
| 71 |
result
|
| 72 |
- `generator/` — the code that builds the sandbox image and regenerates the tasks from openai/math
|
|
|
|
| 79 |
|
| 80 |
```bash
|
| 81 |
pip install "harbor[daytona]>=0.24" daytona
|
| 82 |
+
hf download FineEnvs/openai-math --repo-type dataset --local-dir openai-math
|
| 83 |
+
cd openai-math
|
| 84 |
|
| 85 |
# Build the shared sandbox image once (Lean 4, Mathlib, Comparator; ~9 GB, about an hour).
|
| 86 |
(cd generator && python -m openai_math_harbor.snapshot)
|
generator/openai_math_harbor/adapter.py
CHANGED
|
@@ -13,7 +13,7 @@ come from the challenge's own files, so no task is written by hand. What varies
|
|
| 13 |
|
| 14 |
Output layout (the FineEnvs Harbor dataset convention):
|
| 15 |
|
| 16 |
-
<out>/registry.json Harbor registry: openai-math
|
| 17 |
<out>/README.md dataset card
|
| 18 |
<out>/NOTICE, LICENSE-openai-math attribution for the redistributed statements
|
| 19 |
<out>/manifest.json per-task metadata and the excluded challenges
|
|
@@ -38,7 +38,7 @@ PKG = Path(__file__).parent
|
|
| 38 |
IMAGE_DIR = PKG.parent / "image"
|
| 39 |
TEMPLATES = PKG / "templates"
|
| 40 |
SOURCE_COMMIT = "adc7f1241b42e322a6451854ab7e4b4c146bf78a"
|
| 41 |
-
DATASET_NAME = "openai-math
|
| 42 |
DATASET_VERSION = "1.0"
|
| 43 |
IMAGE_FILES = ["Dockerfile", "lean_setup.sh", "fetch_mathlib.sh", "lakefile.lean", "lake-manifest.json", "pack_submission.py"]
|
| 44 |
|
|
|
|
| 13 |
|
| 14 |
Output layout (the FineEnvs Harbor dataset convention):
|
| 15 |
|
| 16 |
+
<out>/registry.json Harbor registry: openai-math@<version> -> tasks/*
|
| 17 |
<out>/README.md dataset card
|
| 18 |
<out>/NOTICE, LICENSE-openai-math attribution for the redistributed statements
|
| 19 |
<out>/manifest.json per-task metadata and the excluded challenges
|
|
|
|
| 38 |
IMAGE_DIR = PKG.parent / "image"
|
| 39 |
TEMPLATES = PKG / "templates"
|
| 40 |
SOURCE_COMMIT = "adc7f1241b42e322a6451854ab7e4b4c146bf78a"
|
| 41 |
+
DATASET_NAME = "openai-math"
|
| 42 |
DATASET_VERSION = "1.0"
|
| 43 |
IMAGE_FILES = ["Dockerfile", "lean_setup.sh", "fetch_mathlib.sh", "lakefile.lean", "lake-manifest.json", "pack_submission.py"]
|
| 44 |
|
generator/openai_math_harbor/attacks.py
CHANGED
|
@@ -4,7 +4,7 @@ Each probe keeps the task's environment, tests and config unchanged and replaces
|
|
| 4 |
with a script that writes an invalid submission (or tampers with the agent sandbox). Run them with
|
| 5 |
Harbor's oracle agent; every probe must score 0.
|
| 6 |
|
| 7 |
-
python -m openai_math_harbor.attacks --dataset datasets/openai-math
|
| 8 |
"""
|
| 9 |
|
| 10 |
from __future__ import annotations
|
|
|
|
| 4 |
with a script that writes an invalid submission (or tampers with the agent sandbox). Run them with
|
| 5 |
Harbor's oracle agent; every probe must score 0.
|
| 6 |
|
| 7 |
+
python -m openai_math_harbor.attacks --dataset datasets/openai-math/tasks --out datasets/attacks
|
| 8 |
"""
|
| 9 |
|
| 10 |
from __future__ import annotations
|
generator/openai_math_harbor/report.py
CHANGED
|
@@ -37,7 +37,12 @@ def classify(trial: Path) -> dict:
|
|
| 37 |
if reward == 1:
|
| 38 |
cause = "accepted"
|
| 39 |
elif reward is None:
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
else:
|
| 42 |
cause = next((name for name, keys in CAUSES if any(k in text for k in keys)), "rejected")
|
| 43 |
return {
|
|
|
|
| 37 |
if reward == 1:
|
| 38 |
cause = "accepted"
|
| 39 |
elif reward is None:
|
| 40 |
+
exc = result.get("exception_info") or {}
|
| 41 |
+
if "no space left on device" in (exc.get("exception_traceback") or "") + (exc.get("exception_message") or ""):
|
| 42 |
+
# The verifier's disk filled so completely that Harbor could not even fetch the result.
|
| 43 |
+
cause = "disk"
|
| 44 |
+
else:
|
| 45 |
+
cause = "error: " + str(exc.get("exception_type") or g.get("reason", "unknown"))
|
| 46 |
else:
|
| 47 |
cause = next((name for name, keys in CAUSES if any(k in text for k in keys)), "rejected")
|
| 48 |
return {
|
generator/openai_math_harbor/templates/NOTICE
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
-
openai-math
|
| 2 |
-
===========
|
| 3 |
|
| 4 |
This dataset packages the Lean statements of OpenAI's "openai/math" release as Harbor tasks.
|
| 5 |
|
|
|
|
| 1 |
+
openai-math
|
| 2 |
+
===========
|
| 3 |
|
| 4 |
This dataset packages the Lean statements of OpenAI's "openai/math" release as Harbor tasks.
|
| 5 |
|
generator/openai_math_harbor/templates/dataset_README.md
CHANGED
|
@@ -66,7 +66,7 @@ as one end of that design space.
|
|
| 66 |
|
| 67 |
- `tasks/` — one Harbor task per validated problem: instruction, Lean statement, sandbox image recipe,
|
| 68 |
verifier and oracle
|
| 69 |
-
- `registry.json` — Harbor registry entry (`openai-math
|
| 70 |
- `manifest.parquet` — one row per task: field, family, theorem names, reference-proof size, oracle
|
| 71 |
result
|
| 72 |
- `generator/` — the code that builds the sandbox image and regenerates the tasks from openai/math
|
|
@@ -79,8 +79,8 @@ credentials for the agent you run.
|
|
| 79 |
|
| 80 |
```bash
|
| 81 |
pip install "harbor[daytona]>=0.24" daytona
|
| 82 |
-
hf download FineEnvs/openai-math
|
| 83 |
-
cd openai-math
|
| 84 |
|
| 85 |
# Build the shared sandbox image once (Lean 4, Mathlib, Comparator; ~9 GB, about an hour).
|
| 86 |
(cd generator && python -m openai_math_harbor.snapshot)
|
|
|
|
| 66 |
|
| 67 |
- `tasks/` — one Harbor task per validated problem: instruction, Lean statement, sandbox image recipe,
|
| 68 |
verifier and oracle
|
| 69 |
+
- `registry.json` — Harbor registry entry (`openai-math@1.0`)
|
| 70 |
- `manifest.parquet` — one row per task: field, family, theorem names, reference-proof size, oracle
|
| 71 |
result
|
| 72 |
- `generator/` — the code that builds the sandbox image and regenerates the tasks from openai/math
|
|
|
|
| 79 |
|
| 80 |
```bash
|
| 81 |
pip install "harbor[daytona]>=0.24" daytona
|
| 82 |
+
hf download FineEnvs/openai-math --repo-type dataset --local-dir openai-math
|
| 83 |
+
cd openai-math
|
| 84 |
|
| 85 |
# Build the shared sandbox image once (Lean 4, Mathlib, Comparator; ~9 GB, about an hour).
|
| 86 |
(cd generator && python -m openai_math_harbor.snapshot)
|
registry.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
[
|
| 2 |
{
|
| 3 |
-
"name": "openai-math
|
| 4 |
"version": "1.0",
|
| 5 |
"description": "355 Lean 4 theorem-proving tasks from openai/math, graded by Comparator in a separate sandbox.",
|
| 6 |
"tasks": [
|
|
|
|
| 1 |
[
|
| 2 |
{
|
| 3 |
+
"name": "openai-math",
|
| 4 |
"version": "1.0",
|
| 5 |
"description": "355 Lean 4 theorem-proving tasks from openai/math, graded by Comparator in a separate sandbox.",
|
| 6 |
"tasks": [
|