Add nearai-bench flat packaging (one row per task)
Browse files- README.md +141 -0
- data/train-00000-of-00001.parquet +3 -0
README.md
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-generation
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
tags:
|
| 8 |
+
- agents
|
| 9 |
+
- agentic-benchmark
|
| 10 |
+
- evaluation
|
| 11 |
+
- clawbench
|
| 12 |
+
- tool-use
|
| 13 |
+
size_categories:
|
| 14 |
+
- n<1K
|
| 15 |
+
configs:
|
| 16 |
+
- config_name: default
|
| 17 |
+
data_files:
|
| 18 |
+
- split: train
|
| 19 |
+
path: data/train-*.parquet
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
# ClawBench (nearai-bench packaging)
|
| 23 |
+
|
| 24 |
+
A **flat, self-contained repackaging** of [ClawBench](https://github.com/claw-bench/claw-bench)
|
| 25 |
+
— 319 agent tasks across 35 domains, difficulty levels L1–L4. Task
|
| 26 |
+
content, environments and verifiers are **unmodified**, so scores stay
|
| 27 |
+
comparable to the upstream ClawBench leaderboard.
|
| 28 |
+
|
| 29 |
+
## Why this exists
|
| 30 |
+
|
| 31 |
+
Upstream ships a git repo of nested task directories
|
| 32 |
+
(`tasks/<domain>/<task>/{task.toml,instruction.md,environment/,verifier/,solution/}`).
|
| 33 |
+
Cloning that per worker is wasteful for an eval/RL harness. Here each task is
|
| 34 |
+
**one row**, with its three directory payloads as deterministic base64 `tar.gz`
|
| 35 |
+
blobs.
|
| 36 |
+
|
| 37 |
+
```python
|
| 38 |
+
from datasets import load_dataset
|
| 39 |
+
ds = load_dataset("NEAR-AI/clawbench", split="train")
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
## Columns
|
| 43 |
+
|
| 44 |
+
| Column | Type | Notes |
|
| 45 |
+
|---|---|---|
|
| 46 |
+
| `task_id` | string | Stable task id = the upstream task **directory** name (e.g. `acct-001-journal-entries`) |
|
| 47 |
+
| `upstream_id` | string | The `id` field inside `task.toml`. Often a short form (`sec-001`) that is **not** unique across domains — prefer `task_id` |
|
| 48 |
+
| `task_path` | string | `<domain>/<task_id>`, the task's path under upstream `tasks/` |
|
| 49 |
+
| `title` | string | Human-readable title |
|
| 50 |
+
| `domain` | string | One of 34 domains (`email`, `security`, `multi-agent`, …) |
|
| 51 |
+
| `level` | string | `L1`–`L4` difficulty |
|
| 52 |
+
| `track` | string | `foundation` \| `subject-matter`; empty when upstream omits it |
|
| 53 |
+
| `description` | string | One-line task description, when upstream supplies one |
|
| 54 |
+
| `timeout` | int64 | Upstream per-task budget (seconds) |
|
| 55 |
+
| `skills_allowed` | bool | Whether the task permits skill creation/reuse |
|
| 56 |
+
| `tags` | string (JSON) | Upstream tag list |
|
| 57 |
+
| `capabilities` | string (JSON) | e.g. `["tool-use"]` or `["file-read","file-write"]` — see note below |
|
| 58 |
+
| `capability_types` | string (JSON) | e.g. `["reasoning","tool-use"]` |
|
| 59 |
+
| `required_actions` | string (JSON) | e.g. `["file-read","data-processing","file-write"]` |
|
| 60 |
+
| `instruction` | string | **Verbatim `instruction.md`** — the agent-facing prompt |
|
| 61 |
+
| `task_toml` | string | **Verbatim `task.toml`** |
|
| 62 |
+
| `environment_tar` | string | base64(tar.gz) of `environment/` — `setup.sh` plus any `data/` seed files |
|
| 63 |
+
| `verifier_tar` | string | base64(tar.gz) of `verifier/` (pytest `test_output.py`) **plus a bundled `conftest.py`** |
|
| 64 |
+
| `solution_tar` | string | base64(tar.gz) of `solution/` — the reference `solve.sh` |
|
| 65 |
+
|
| 66 |
+
### Note on the two upstream `task.toml` shapes
|
| 67 |
+
|
| 68 |
+
Upstream is not uniform: 65 tasks nest their metadata under a `[task]` table,
|
| 69 |
+
the other 254 put the same keys at the top level — and the two shapes carve up
|
| 70 |
+
capabilities differently (`capabilities` + `required_actions` vs.
|
| 71 |
+
`capabilities` + `capability_types`). The flattened columns above normalize
|
| 72 |
+
both, and `task_toml` always holds the verbatim original. If you parse
|
| 73 |
+
`task_toml` yourself, handle both shapes or you will silently blank the
|
| 74 |
+
metadata of 80% of the suite.
|
| 75 |
+
|
| 76 |
+
## Running a task
|
| 77 |
+
|
| 78 |
+
```python
|
| 79 |
+
import base64, io, subprocess, tarfile, tempfile, pathlib
|
| 80 |
+
|
| 81 |
+
def untar(b64, dest):
|
| 82 |
+
if not b64: return
|
| 83 |
+
dest.mkdir(parents=True, exist_ok=True)
|
| 84 |
+
with tarfile.open(fileobj=io.BytesIO(base64.b64decode(b64)), mode="r:gz") as t:
|
| 85 |
+
t.extractall(dest)
|
| 86 |
+
|
| 87 |
+
row = ds[0]
|
| 88 |
+
tmp = pathlib.Path(tempfile.mkdtemp())
|
| 89 |
+
untar(row["environment_tar"], tmp / "environment")
|
| 90 |
+
untar(row["verifier_tar"], tmp / "verifier")
|
| 91 |
+
workspace = tmp / "workspace"; workspace.mkdir()
|
| 92 |
+
|
| 93 |
+
# 1. seed the workspace
|
| 94 |
+
subprocess.run(["bash", str(tmp / "environment/setup.sh"), str(workspace)], check=True)
|
| 95 |
+
# 2. give row["instruction"] to the agent, let it work in `workspace`
|
| 96 |
+
# 3. score with the upstream pytest verifier
|
| 97 |
+
subprocess.run(
|
| 98 |
+
["python", "-m", "pytest", "verifier/test_output.py", "--workspace", str(workspace), "-q"],
|
| 99 |
+
cwd=tmp,
|
| 100 |
+
)
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
`setup.sh` takes the workspace directory as `$1`. Pass an **absolute** path —
|
| 104 |
+
several scripts interpolate `$1` into a heredoc that runs with a different cwd,
|
| 105 |
+
so a relative path silently produces an empty workspace.
|
| 106 |
+
|
| 107 |
+
## Scoring
|
| 108 |
+
|
| 109 |
+
The verifier is pytest. Each test carries an `@pytest.mark.weight(n)` marker
|
| 110 |
+
(default `2.0`); the task score is
|
| 111 |
+
`sum(weight of passing tests) / sum(all weights)`. `conftest.py` — bundled into
|
| 112 |
+
every `verifier_tar` — provides both that marker and the `--workspace` option,
|
| 113 |
+
so a verifier run needs nothing else from the upstream repo.
|
| 114 |
+
|
| 115 |
+
Two things worth knowing if you compare numbers:
|
| 116 |
+
|
| 117 |
+
- The verifier imports `numpy`/`pandas` for some domains. A verifier
|
| 118 |
+
environment missing them yields false zeros rather than errors.
|
| 119 |
+
- The upstream leaderboard metric is a difficulty-weighted aggregate over a
|
| 120 |
+
5-dimension composite, not a flat mean of per-task scores.
|
| 121 |
+
|
| 122 |
+
A reference implementation lives in
|
| 123 |
+
[`nearai/benchmarks`](https://github.com/nearai/benchmarks) at
|
| 124 |
+
`src/adapters/clawbench.rs`.
|
| 125 |
+
|
| 126 |
+
## ⚠️ Contamination warning
|
| 127 |
+
|
| 128 |
+
`solution_tar` contains **reference solutions**. They are published upstream
|
| 129 |
+
too, and they are needed for golden-validation (a correct harness must score
|
| 130 |
+
1.0 when the solution is applied and ~0.0 on an empty workspace) — but do not
|
| 131 |
+
train on this column, and drop it before handing any of this to a model.
|
| 132 |
+
|
| 133 |
+
## Provenance & license
|
| 134 |
+
|
| 135 |
+
- **Upstream**: <https://github.com/claw-bench/claw-bench> — Apache-2.0.
|
| 136 |
+
Pinned commit `1fc25add8fe77aa498d58fb564ea91a87307da76`.
|
| 137 |
+
- **This repackaging**: Apache-2.0, same terms. Task content unmodified; only
|
| 138 |
+
the container format changed, plus a `conftest.py` copy bundled into each
|
| 139 |
+
`verifier_tar` for self-containment.
|
| 140 |
+
- **Packaged by**: [NEAR AI](https://near.ai) for
|
| 141 |
+
[nearai-bench](https://github.com/nearai/benchmarks).
|
data/train-00000-of-00001.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:308284ca1a3b16e4e50e449bf8c1eba6f6bace78ccba849c7ba64bd4b834d4a7
|
| 3 |
+
size 1603892
|