nosuchstudios commited on
Commit
9b3b374
·
verified ·
1 Parent(s): dda7a1b

Publish code-execution-2026-09-14 (Fruit Fly Brain, 2026-09-14)

Browse files
artifacts/code-execution-2026-09-14/CODE_EXECUTION.md ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Bounded code-execution harness
2
+
3
+ `hf_space/ffb_playground/code_exec.py` runs candidate Python solutions against the
4
+ published code inputs in a bounded, isolated subprocess and reports pass/fail per
5
+ item. `scripts/run_code_execution.py` is the CLI. **This is an execution harness,
6
+ not a leaderboard and not a capability claim.** Every reported number is tied to
7
+ one pinned input revision.
8
+
9
+ ## What is scored
10
+
11
+ | Input | Source dataset | Pinned revision | Items | sha256 |
12
+ | --- | --- | --- | --- | --- |
13
+ | `humanevalplus.jsonl` | `evalplus/humanevalplus` | `d32357cf319e50e9c8d8dab5ea876c72b0fd321b` | 164 | `a9e669bdea9940ebf7557040ae5f164dff8b2d2f364e1d579068b4aa89ddf94c` |
14
+ | `mbppplus.jsonl` | `evalplus/mbppplus` | `b2d74c91837c3f2a20c1299ae98133cbe7cfa077` | 378 | `945926d37090faf87066ac86c51fc4bfb3c5955cb9ec2a7fc2aa4f753ba3f0be` |
15
+ | `humaneval.jsonl` | `openai/openai_humaneval` | `7dce6050a7d6d172f3cc5c32aa97f52fa1a2e544` | 164 | `72b6fc6216b621a67655f0f804d00a91fd021181af37128e377eb01e1a1497fa` |
16
+ | `livecodebench_postcutoff.jsonl` | `livecodebench/code_generation_lite` | `0fe84c3912ea0c4d4a78037083943e8f0c4dd505` | 200 | `3ca83835a90ecf84adc1aa1360d081f8f8eaf71f68634dca72df6fe8d8cc2fa2` |
17
+
18
+ The harness reads `prompt` + `test` from each item. HumanEval / HumanEval+ items
19
+ define `check(candidate)`; the harness appends `check(<entry_point>)`. MBPP+
20
+ tests call the entry point directly. The upstream reference solution is **not** in
21
+ the published inputs, so `--self-test` reads it from
22
+ `hf_space/assets/code_execution/references.jsonl` and verifies its sha256 against
23
+ the item's `canonical_solution_sha256` before running it; a mismatch is reported,
24
+ never scored as a pass.
25
+
26
+ LiveCodeBench items carry `tests_available=false` (private tests are
27
+ `base64+zlib+pickle` upstream and are not mirrored). They are always reported as
28
+ `unscored` and are never executed or scored from invented expected outputs.
29
+
30
+ ## Isolation
31
+
32
+ Each candidate is written to a throwaway temp file and run as a separate process:
33
+
34
+ * `python -I -B <candidate.py>` — isolated interpreter, no bytecode, no user
35
+ site, the script directory is not on `sys.path`;
36
+ * empty environment (`env={}`), `cwd` = the temp directory, `stdin` closed;
37
+ * wall-clock timeout enforced by the parent; on expiry the child's whole process
38
+ group is `SIGKILL`ed;
39
+ * `resource.setrlimit(RLIMIT_AS)` address-space cap where the platform allows it;
40
+ * a preamble that replaces `socket.socket`, `socket.create_connection`,
41
+ `socket.socketpair`, `socket.getaddrinfo` and `os.system`/`os.popen`/
42
+ `subprocess.*` with raising stubs, so direct and indirect network access fails.
43
+
44
+ The child is a normal OS process, not a VM or container: this is **best-effort
45
+ isolation, not a hardened security boundary** against adversarial native code.
46
+
47
+ ## CLI
48
+
49
+ ```bash
50
+ uv run --no-project --with numpy --with pyyaml python scripts/run_code_execution.py \
51
+ --inputs /home/user/dev/hf/hf-stage/publish/inputs-code-2026-09-13 \
52
+ --candidates <jsonl-or-dir> --timeout 10 \
53
+ --out /home/user/dev/hf/hf-stage/publish/code-execution-2026-09-14/results.json
54
+ ```
55
+
56
+ A candidate row is `{"task_id": ..., "solution": ...}` with an optional
57
+ `"source"` to disambiguate ids shared by HumanEval and HumanEval+ (e.g.
58
+ `HumanEval/0`). The solution may be a completion (HumanEval-style) or a full
59
+ definition; the harness detects which. `--inputs` accepts one or more files or
60
+ directories. Writes a `manifest.json` next to `--out` unless `--manifest` is
61
+ given.
62
+
63
+ ```bash
64
+ uv run --no-project --with numpy --with pyyaml python scripts/run_code_execution.py \
65
+ --self-test --out /home/user/dev/hf/hf-stage/publish/code-execution-2026-09-14/selftest.json
66
+ ```
67
+
68
+ `--self-test` runs every verified reference solution and asserts it passes
69
+ (`exit 0`), using a generous default budget (120 s / 4096 MiB) because a few
70
+ extended HumanEval+/MBPP+ suites are compute-heavy. It also confirms a requested
71
+ `--timeout`/`--memory-mb` is honoured for explicit runs. Rebuild the references
72
+ (all solutions hashed against the pinned items) offline from the local Hub cache:
73
+
74
+ ```bash
75
+ uv run --no-project --with pyarrow --with numpy --with pyyaml python \
76
+ scripts/run_code_execution.py --build-references \
77
+ --references hf_space/assets/code_execution/references.jsonl
78
+ ```
79
+
80
+ ## Self-test result (reference validation)
81
+
82
+ Reference file sha256 `4230bcc7201518733d8f8ca4a8690b46e7372eda3f7bae018a22752ab06c2574`.
83
+
84
+ | Count | Value |
85
+ | --- | --- |
86
+ | scored (published tests executed) | 705 |
87
+ | passed | 705 |
88
+ | failed | 0 |
89
+ | unscored (tests unavailable) | 200 |
90
+ | skipped (reference exception) | 1 |
91
+ | references verified against pinned sha256 | 705 / 706 |
92
+
93
+ The one exception is `evalplus/humanevalplus:HumanEval/32`. Its pinned test
94
+ asserts `_poly(*candidate(*inp), inp)`, which tries to unpack a float; the
95
+ canonical `find_zero` returns a float, so the reference cannot pass. This is a
96
+ data defect in the pinned revision, tracked upstream (evalplus/evalplus#125 and
97
+ #253) and unfixed there. The harness does **not** rewrite the test and does not
98
+ report a fabricated pass; the item is declared as a validation exception and
99
+ left failing for any real candidate.
100
+
101
+ Running the same references through the ordinary `--candidates` path (no
102
+ exception list) yields 706 scored, 705 passed, 1 failed, 200 unscored — the same
103
+ `HumanEval/32` defect, surfaced rather than hidden.
104
+
105
+ ## Manifest schema (`ffb-code-execution-v1`)
106
+
107
+ `manifest.json` records: `schema`, `generated_by`, `generated_at`, `mode`,
108
+ `counts` (with per-source breakdown), `inputs` (path → sha256, bytes, count,
109
+ source, revision), `item_count`, `limits` (timeout, memory, workers),
110
+ `environment` (platform, python, executable, cpu count, child command, empty
111
+ environment, disabled network, worker count), `references` (self-test coverage)
112
+ and `non_claims`.
113
+
114
+ ## Honest limitations
115
+
116
+ * Not a leaderboard and not a capability claim. HumanEval and HumanEval+ share
117
+ the same 164 ids and must not be merged or compared as independent corpora;
118
+ MBPP+ is a stricter companion to MBPP. A pass rate here is a floor: these
119
+ benchmarks are small, public and almost certainly in pretraining data.
120
+ * LiveCodeBench private tests are not mirrored, so those 200 items are
121
+ `unscored`; coverage is public-case-free and is **not** a LiveCodeBench score.
122
+ The date window is a proxy for model-unseen status, not proof.
123
+ * The default `--timeout 10` is a candidate budget, not a performance benchmark.
124
+ Several canonical solutions need more than 10 s on the extended suites
125
+ (e.g. HumanEval/15 ≈ 17 s, HumanEval/130 ≈ 11 s, Mbpp/271 ≈ 12 s); the
126
+ self-test uses 120 s so validation is not a timeout measurement.
127
+ * The memory cap is `RLIMIT_AS` (virtual address space) and is platform
128
+ dependent; `Mbpp/255` needs ≈4 GiB under the reference solution and fails
129
+ under the 1 GiB default. Caps apply best-effort only where the OS allows.
130
+ * `HumanEval/32` is a known upstream test defect in the pinned revision and is
131
+ reported, not patched.
132
+ * Network blocking is a `socket`/`subprocess` preamble in the child, not a
133
+ network namespace or container; a determined native attacker could bypass it.
134
+ There is no filesystem sandbox beyond the throwaway working directory.
135
+ * Reference solutions are redistributed in `references.jsonl` under the source
136
+ licences (MIT / Apache-2.0 / CC-BY-4.0-derived MBPP+); see
137
+ `inputs-code-2026-09-13/LICENSE_NOTES.md` and
138
+ `inputs-livecodebench-2026-09-14/LICENSE_NOTES.md`.
artifacts/code-execution-2026-09-14/manifest.json ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "counts": {
3
+ "by_source": {
4
+ "evalplus/humanevalplus": {
5
+ "items": 164,
6
+ "passed": 163,
7
+ "scored": 164,
8
+ "unscored": 0
9
+ },
10
+ "evalplus/mbppplus": {
11
+ "items": 378,
12
+ "passed": 378,
13
+ "scored": 378,
14
+ "unscored": 0
15
+ },
16
+ "livecodebench/code_generation_lite": {
17
+ "items": 200,
18
+ "passed": 0,
19
+ "scored": 0,
20
+ "unscored": 200
21
+ },
22
+ "openai/openai_humaneval": {
23
+ "items": 164,
24
+ "passed": 164,
25
+ "scored": 164,
26
+ "unscored": 0
27
+ }
28
+ },
29
+ "errors": 0,
30
+ "failed": 1,
31
+ "items": 906,
32
+ "pass_rate": 0.998584,
33
+ "passed": 705,
34
+ "scored": 706,
35
+ "skipped": 0,
36
+ "unscored": 200
37
+ },
38
+ "environment": {
39
+ "child_command": "/home/user/.cache/uv/builds-v0/.tmpoGb0vC/bin/python -I -B <candidate.py>",
40
+ "child_environment": "empty (env={})",
41
+ "cpu_count": 4,
42
+ "isolation_note": "bounded best-effort isolation; not a hardened security boundary",
43
+ "machine": "x86_64",
44
+ "memory_mb": 4096,
45
+ "network": "disabled in child (socket + subprocess blocked; no network namespace)",
46
+ "platform": "linux",
47
+ "python_executable": "/home/user/.cache/uv/builds-v0/.tmpoGb0vC/bin/python",
48
+ "python_version": "3.13.14",
49
+ "timeout_seconds": 120.0,
50
+ "workers": 4,
51
+ "working_directory": "throwaway temp dir"
52
+ },
53
+ "generated_at": "2026-09-14T23:49:28.364960+00:00",
54
+ "generated_by": "scripts/run_code_execution.py",
55
+ "inputs": {
56
+ "/home/user/dev/hf/hf-stage/publish/inputs-code-2026-09-13/humaneval.jsonl": {
57
+ "bytes": 223827,
58
+ "count": 164,
59
+ "filename": "humaneval.jsonl",
60
+ "revision": "7dce6050a7d6d172f3cc5c32aa97f52fa1a2e544",
61
+ "sha256": "72b6fc6216b621a67655f0f804d00a91fd021181af37128e377eb01e1a1497fa",
62
+ "source": "openai/openai_humaneval"
63
+ },
64
+ "/home/user/dev/hf/hf-stage/publish/inputs-code-2026-09-13/humanevalplus.jsonl": {
65
+ "bytes": 11002996,
66
+ "count": 164,
67
+ "filename": "humanevalplus.jsonl",
68
+ "revision": "d32357cf319e50e9c8d8dab5ea876c72b0fd321b",
69
+ "sha256": "a9e669bdea9940ebf7557040ae5f164dff8b2d2f364e1d579068b4aa89ddf94c",
70
+ "source": "evalplus/humanevalplus"
71
+ },
72
+ "/home/user/dev/hf/hf-stage/publish/inputs-code-2026-09-13/mbppplus.jsonl": {
73
+ "bytes": 4837216,
74
+ "count": 378,
75
+ "filename": "mbppplus.jsonl",
76
+ "revision": "b2d74c91837c3f2a20c1299ae98133cbe7cfa077",
77
+ "sha256": "945926d37090faf87066ac86c51fc4bfb3c5955cb9ec2a7fc2aa4f753ba3f0be",
78
+ "source": "evalplus/mbppplus"
79
+ },
80
+ "/home/user/dev/hf/hf-stage/publish/inputs-livecodebench-2026-09-14/livecodebench_postcutoff.jsonl": {
81
+ "bytes": 493011,
82
+ "count": 200,
83
+ "filename": "livecodebench_postcutoff.jsonl",
84
+ "revision": "0fe84c3912ea0c4d4a78037083943e8f0c4dd505",
85
+ "sha256": "3ca83835a90ecf84adc1aa1360d081f8f8eaf71f68634dca72df6fe8d8cc2fa2",
86
+ "source": "livecodebench/code_generation_lite"
87
+ }
88
+ },
89
+ "item_count": 906,
90
+ "limits": {
91
+ "memory_mb": 4096,
92
+ "timeout_seconds": 120.0,
93
+ "workers": 4
94
+ },
95
+ "mode": "evaluate",
96
+ "non_claims": [
97
+ "This is an execution harness, not a leaderboard and not a capability claim.",
98
+ "The benchmarks are small, public and contamination-prone; any pass rate is a floor, not evidence of generalisation.",
99
+ "HumanEval and HumanEval+ share ids and must not be merged or treated as independent corpora; MBPP+ is a stricter companion to MBPP.",
100
+ "Process-level isolation is best-effort and is not a hardened security boundary against adversarial native code."
101
+ ],
102
+ "references": {},
103
+ "schema": "ffb-code-execution-v1"
104
+ }
artifacts/code-execution-2026-09-14/results.json ADDED
The diff for this file is too large to render. See raw diff
 
artifacts/code-execution-2026-09-14/selftest.json ADDED
The diff for this file is too large to render. See raw diff
 
artifacts/code-execution-2026-09-14/selftest_manifest.json ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "counts": {
3
+ "by_source": {
4
+ "evalplus/humanevalplus": {
5
+ "items": 164,
6
+ "passed": 163,
7
+ "scored": 163,
8
+ "unscored": 0
9
+ },
10
+ "evalplus/mbppplus": {
11
+ "items": 378,
12
+ "passed": 378,
13
+ "scored": 378,
14
+ "unscored": 0
15
+ },
16
+ "livecodebench/code_generation_lite": {
17
+ "items": 200,
18
+ "passed": 0,
19
+ "scored": 0,
20
+ "unscored": 200
21
+ },
22
+ "openai/openai_humaneval": {
23
+ "items": 164,
24
+ "passed": 164,
25
+ "scored": 164,
26
+ "unscored": 0
27
+ }
28
+ },
29
+ "errors": 0,
30
+ "failed": 0,
31
+ "items": 906,
32
+ "pass_rate": 1.0,
33
+ "passed": 705,
34
+ "scored": 705,
35
+ "skipped": 1,
36
+ "unscored": 200
37
+ },
38
+ "environment": {
39
+ "child_command": "/home/user/.cache/uv/builds-v0/.tmplfxBb8/bin/python -I -B <candidate.py>",
40
+ "child_environment": "empty (env={})",
41
+ "cpu_count": 4,
42
+ "isolation_note": "bounded best-effort isolation; not a hardened security boundary",
43
+ "machine": "x86_64",
44
+ "memory_mb": 4096,
45
+ "network": "disabled in child (socket + subprocess blocked; no network namespace)",
46
+ "platform": "linux",
47
+ "python_executable": "/home/user/.cache/uv/builds-v0/.tmplfxBb8/bin/python",
48
+ "python_version": "3.13.14",
49
+ "timeout_seconds": 120,
50
+ "workers": 4,
51
+ "working_directory": "throwaway temp dir"
52
+ },
53
+ "generated_at": "2026-09-14T23:52:56.378777+00:00",
54
+ "generated_by": "scripts/run_code_execution.py",
55
+ "inputs": {
56
+ "/home/user/dev/hf/hf-stage/publish/inputs-code-2026-09-13/humaneval.jsonl": {
57
+ "bytes": 223827,
58
+ "count": 164,
59
+ "filename": "humaneval.jsonl",
60
+ "revision": "7dce6050a7d6d172f3cc5c32aa97f52fa1a2e544",
61
+ "sha256": "72b6fc6216b621a67655f0f804d00a91fd021181af37128e377eb01e1a1497fa",
62
+ "source": "openai/openai_humaneval"
63
+ },
64
+ "/home/user/dev/hf/hf-stage/publish/inputs-code-2026-09-13/humanevalplus.jsonl": {
65
+ "bytes": 11002996,
66
+ "count": 164,
67
+ "filename": "humanevalplus.jsonl",
68
+ "revision": "d32357cf319e50e9c8d8dab5ea876c72b0fd321b",
69
+ "sha256": "a9e669bdea9940ebf7557040ae5f164dff8b2d2f364e1d579068b4aa89ddf94c",
70
+ "source": "evalplus/humanevalplus"
71
+ },
72
+ "/home/user/dev/hf/hf-stage/publish/inputs-code-2026-09-13/mbppplus.jsonl": {
73
+ "bytes": 4837216,
74
+ "count": 378,
75
+ "filename": "mbppplus.jsonl",
76
+ "revision": "b2d74c91837c3f2a20c1299ae98133cbe7cfa077",
77
+ "sha256": "945926d37090faf87066ac86c51fc4bfb3c5955cb9ec2a7fc2aa4f753ba3f0be",
78
+ "source": "evalplus/mbppplus"
79
+ },
80
+ "/home/user/dev/hf/hf-stage/publish/inputs-livecodebench-2026-09-14/livecodebench_postcutoff.jsonl": {
81
+ "bytes": 493011,
82
+ "count": 200,
83
+ "filename": "livecodebench_postcutoff.jsonl",
84
+ "revision": "0fe84c3912ea0c4d4a78037083943e8f0c4dd505",
85
+ "sha256": "3ca83835a90ecf84adc1aa1360d081f8f8eaf71f68634dca72df6fe8d8cc2fa2",
86
+ "source": "livecodebench/code_generation_lite"
87
+ }
88
+ },
89
+ "item_count": 906,
90
+ "limits": {
91
+ "memory_mb": 4096,
92
+ "timeout_seconds": 120,
93
+ "workers": 4
94
+ },
95
+ "mode": "self-test",
96
+ "non_claims": [
97
+ "This is an execution harness, not a leaderboard and not a capability claim.",
98
+ "The benchmarks are small, public and contamination-prone; any pass rate is a floor, not evidence of generalisation.",
99
+ "HumanEval and HumanEval+ share ids and must not be merged or treated as independent corpora; MBPP+ is a stricter companion to MBPP.",
100
+ "Process-level isolation is best-effort and is not a hardened security boundary against adversarial native code."
101
+ ],
102
+ "references": {
103
+ "available": 706,
104
+ "exception_count": 1,
105
+ "exceptions": [
106
+ {
107
+ "issue": "https://github.com/evalplus/evalplus/issues/125",
108
+ "reason": "The pinned humanevalplus test asserts `_poly(*candidate(*inp), inp)`, which unpacks a float; the canonical find_zero returns a float, so the reference cannot pass. The defect is tracked upstream (evalplus/evalplus#125, #253) and is unfixed in this pinned revision. The harness does not rewrite tests and does not fabricate a pass.",
109
+ "source": "evalplus/humanevalplus",
110
+ "task_id": "HumanEval/32"
111
+ }
112
+ ],
113
+ "mismatched": [],
114
+ "missing": [],
115
+ "verified": 705
116
+ },
117
+ "schema": "ffb-code-execution-v1"
118
+ }