dicemy commited on
Commit
e82d13f
·
verified ·
1 Parent(s): cca3ae0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +328 -1
README.md CHANGED
@@ -1,3 +1,330 @@
1
  ---
2
- license: mit
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ # For reference on dataset card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/datasetcard.md?plain=1
3
+ # Doc / guide: https://huggingface.co/docs/hub/datasets-cards
4
+ {}
5
  ---
6
+ # DataClawEval
7
+
8
+ [![Tasks](https://img.shields.io/badge/Tasks-100-blue)](tasks)
9
+ [![Evaluated Models](https://img.shields.io/badge/Evaluated_Models-16-green)](#paper-results)
10
+ [![License](https://img.shields.io/badge/License-MIT-yellow)](LICENSE)
11
+ [![Paper](https://img.shields.io/badge/📄_Paper-PDF-red)](DataClawEval__A_Benchmark_for_Data_Engineering_Agents_in_Real_Industrial_Harness.pdf)
12
+ [![arXiv](https://img.shields.io/badge/arXiv-2607.28033-b31b1b.svg)](https://arxiv.org/abs/2607.28033)
13
+
14
+
15
+ **An executable benchmark for end-to-end data-engineering agents in industrial environments.**
16
+
17
+ DataClawEval measures an autonomous agent's ability to inspect data, implement and debug pipelines,
18
+ and materialize correct artifacts in realistic data-engineering workflows. It contains 100
19
+ production-grounded tasks across five execution engines: PySpark, MySQL, HiveSQL, PrestoSQL/Trino,
20
+ and FlinkSQL. Each task runs in an isolated Docker sandbox and is evaluated by a case-specific,
21
+ deterministic, rule-based grader.
22
+
23
+ ---
24
+
25
+ ## What's Inside
26
+
27
+ - **Production-grounded tasks** — 100 end-to-end tasks reconstructed from production-grade
28
+ implementations written by professional enterprise data engineers and validated through
29
+ execution checks, expert perturbations, and expert review.
30
+ - **Batch and streaming coverage** — batch transformations in PySpark, MySQL, HiveSQL, and
31
+ PrestoSQL/Trino, plus streaming-oriented FlinkSQL tasks involving event time, watermarks,
32
+ windows, joins, and aggregations.
33
+ - **End-to-end agent workflows** — schema inspection, data exploration, implementation, execution,
34
+ debugging, output validation, and artifact materialization.
35
+ - **Artifact- and process-oriented grading** — task-specific graders assess executable outputs and
36
+ engineering behaviors such as exploration, execution efficiency, and self-verification.
37
+ - **Reproducible environments** — every run starts in a fresh container with task-specific data,
38
+ services, execution engines, and deterministic initialization.
39
+ - **Flexible agent integration** — run evaluations with the `codebuddy`, `claude-code`, or `codex`
40
+ backend. The paper evaluates 16 model configurations through a unified CodeBuddy scaffold.
41
+ - **Batch experiments** — evaluate one or more engines in parallel and generate combined reports.
42
+
43
+ ### Task Suite
44
+
45
+ | Execution engine | Workload | Tasks |
46
+ |------------------|----------|------:|
47
+ | PySpark | Batch (`offline-compute`) | 20 |
48
+ | MySQL | Batch (`offline-compute`) | 20 |
49
+ | HiveSQL | Batch (`offline-compute`) | 28 |
50
+ | PrestoSQL/Trino | Batch (`offline-compute`) | 12 |
51
+ | FlinkSQL | Streaming (`online-compute`) | 20 |
52
+ | **Total** | | **100** |
53
+
54
+ The suite is also balanced between 50 English and 50 Chinese task prompts and covers five business
55
+ domains: Ops & Resource Governance (30), Data Analytics & User Growth (30), Security & Risk
56
+ Control (16), Content, Community & Dev-Efficiency (14), and Advertising & Marketing (10).
57
+
58
+ Each task lives in `tasks/<workload>/<engine>/<task_id>/` and contains:
59
+
60
+ - `task.md` — the natural-language request and metadata such as timeout and engine
61
+ - `init/` — initialization or verification assets; batch tasks initialize tables here, while FlinkSQL
62
+ tasks generally define generated streaming inputs in the submitted SQL
63
+ - `gt/` — the reference implementation and task-specific `grade.py` used during evaluation
64
+
65
+ ---
66
+
67
+ ## How It Works
68
+
69
+ For every model–task run, the harness:
70
+
71
+ 1. Starts a fresh Docker container from the configured `DOCKER_IMAGE`.
72
+ 2. Starts the services required by the selected engine and initializes task-specific inputs.
73
+ 3. Prepares the agent workspace with the task prompt and engineering tools.
74
+ 4. Runs the selected agent backend and records its execution trajectory.
75
+ 5. Loads `gt/` after agent execution and runs the task-specific grader in the same container.
76
+ 6. Collects the submitted solution files, workspace snapshot, scores, usage data, and execution
77
+ transcript into `output/`, then removes the container.
78
+
79
+ ---
80
+
81
+ ## Requirements
82
+
83
+ | Component | Requirement |
84
+ |-----------|-------------|
85
+ | Docker | Docker CLI and a running daemon |
86
+ | Python | Python 3.11 on the host; the scripts invoke `python3.11` |
87
+ | Storage | Enough free space for the multi-engine image and task outputs |
88
+ | Model access | Credentials and network access for the selected agent backend |
89
+
90
+ The evaluation image provides a ready-to-use multi-engine environment with Spark 3.5.0, Flink
91
+ 1.18.1, Trino 435, MySQL, a Hive Metastore, Python 3.11.13, and the supported agent runtimes.
92
+
93
+ ---
94
+
95
+ ## Quick Start
96
+
97
+ ### 0. Verify prerequisites
98
+
99
+ Make sure Docker is installed and running, and that Python 3.11 is available.
100
+
101
+ ```bash
102
+ docker version # verifies the Docker CLI and daemon connection
103
+ python3.11 --version # Python 3.11 is required
104
+ ```
105
+
106
+ ### 1. Install Python dependencies
107
+
108
+ ```bash
109
+ python3.11 -m pip install -r requirements.txt
110
+ ```
111
+
112
+ ### 2. Get the evaluation image
113
+
114
+ You have two options.
115
+
116
+ **Option A — Pull the prebuilt image (recommended)**
117
+
118
+ Skip the local build and pull the ready-made image from the registry:
119
+
120
+ ```bash
121
+ docker pull dicemy/dataclaweval:v1.0
122
+ docker tag dicemy/dataclaweval:v1.0 dataclaw-eval:v1.0 # match DOCKER_IMAGE in .env
123
+ ```
124
+
125
+ > The default `DOCKER_IMAGE` in `.env` is `dataclaw-eval:v1.0`. Either retag the pulled image
126
+ > as shown above, or set `DOCKER_IMAGE=dicemy/dataclaweval:v1.0` in your `.env`.
127
+
128
+ **Option B — Build locally**
129
+
130
+ `prepare.sh` vendors the installed CodeBuddy Agent SDK and builds the
131
+ `dataclaw-eval:v1.0` evaluation image.
132
+
133
+ ```bash
134
+ bash script/prepare.sh
135
+ ```
136
+
137
+ ### 3. Configure credentials
138
+
139
+ Copy the example env file and fill in the values for the agent backend you plan to use.
140
+
141
+ ```bash
142
+ cp .env.example .env
143
+ ```
144
+
145
+ Then edit `.env`:
146
+
147
+ ```ini
148
+ DOCKER_IMAGE=dataclaw-eval:v1.0
149
+
150
+ # CodeBuddy auth (required for the `codebuddy` harness)
151
+ CODEBUDDY_AUTH_TOKEN=
152
+ CODEBUDDY_API_KEY=
153
+ CODEBUDDY_INTERNET_ENVIRONMENT=ioa # public | internal | ioa
154
+
155
+ # OpenRouter (required for `claude-code` and `codex` harnesses)
156
+ OPENROUTER_API_KEY=
157
+ OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
158
+ ```
159
+
160
+ > Get a CodeBuddy API key: overseas → <https://www.codebuddy.ai/profile/keys> ·
161
+ > China → <https://copilot.tencent.com/profile/> · iOA (Tencent staff) →
162
+ > <https://tencent.sso.copilot.tencent.com/profile/keys>. Set
163
+ > `CODEBUDDY_INTERNET_ENVIRONMENT` to match your account type.
164
+
165
+ ### 4. Run the evaluation
166
+
167
+ ```bash
168
+ # Run a single execution engine
169
+ bash script/run_batch.sh -P # PySpark
170
+ bash script/run_batch.sh -M # MySQL
171
+ bash script/run_batch.sh -H # HiveSQL
172
+ bash script/run_batch.sh -F # FlinkSQL
173
+ bash script/run_batch.sh -PR # PrestoSQL/Trino
174
+
175
+ # Run workload groups
176
+ bash script/run_batch.sh -offline # PySpark + MySQL + HiveSQL + PrestoSQL/Trino
177
+ bash script/run_batch.sh -online # FlinkSQL
178
+ bash script/run_batch.sh -all # all 100 tasks
179
+ ```
180
+
181
+ Use `script/run_batch.sh -all` to evaluate the complete 100-task suite. Results and a combined
182
+ report are written to `output/`.
183
+
184
+ ---
185
+
186
+ ## Usage Reference
187
+
188
+ `run_batch.sh` options:
189
+
190
+ | Flag / Option | Description |
191
+ |---------------|-------------|
192
+ | `-P` `-M` `-H` `-F` `-PR` | Select PySpark / MySQL / HiveSQL / FlinkSQL / PrestoSQL/Trino |
193
+ | `-offline` `-online` `-all` | Run predefined workload groups |
194
+ | `--parallel N` | Number of tasks to run concurrently (default: 10) |
195
+ | `--harness NAME` | Agent backend: `codebuddy` (default), `claude-code`, `codex` |
196
+ | `--model MODEL` | Model name (repeatable, `codebuddy` only) for multi-model runs |
197
+
198
+ Examples:
199
+
200
+ ```bash
201
+ # PySpark with 5 workers
202
+ bash script/run_batch.sh -P --parallel 5
203
+
204
+ # Use the Claude Code harness
205
+ bash script/run_batch.sh -P --harness claude-code
206
+
207
+ # Compare two CodeBuddy models on PySpark
208
+ bash script/run_batch.sh -P --model model_a --model model_b
209
+ ```
210
+
211
+ To run a single task directly (bypassing batch mode):
212
+
213
+ ```bash
214
+ python3.11 eval/run_batch.py \
215
+ --agent-backend codebuddy \
216
+ --task tasks/offline-compute/PySpark/pyspark_001/task.md \
217
+ --model deepseek-v4-flash-ioa
218
+ ```
219
+
220
+ ---
221
+
222
+ ## Output & Scoring
223
+
224
+ Each run is saved under `output/<harness>/<category>/<task_id>/<run_suffix>/` with the submitted
225
+ solution, workspace snapshot, transcript, usage statistics, and `score.json`.
226
+
227
+ DataClawEval evaluates both the final data product and the engineering workflow:
228
+
229
+ - **Artifact quality** — executability, schema correctness, row-level alignment, numerical accuracy,
230
+ and categorical or business correctness.
231
+ - **Process quality** — exploration adequacy, execution efficiency, and self-verification.
232
+
233
+ The overall score combines both dimensions:
234
+
235
+ \[
236
+ S = \alpha S_{artifact} + (1-\alpha)S_{process}
237
+ \]
238
+
239
+ The artifact weight \(\alpha\) is configured per task, with 0.7 as the most common value. Repository
240
+ outputs normalize `overall_score` to 0–1, while the paper presents scores on a 0–100 scale.
241
+
242
+ Batch runs aggregate model and engine summaries into
243
+ `output/experiment_report_<timestamp>.json` and report the average score and the number of tasks
244
+ with `overall_score >= 0.5`:
245
+
246
+ ```
247
+ Category/Model Tasks Avg Score Pass(>=0.5)
248
+ offline-compute/PySpark/model_a 20 0.7350 15/20
249
+ ```
250
+
251
+ ---
252
+
253
+ ## Paper Results
254
+
255
+ The paper evaluates 16 model configurations from eight families on all 100 tasks: 1,600 primary
256
+ runs in total. Every model uses the same fixed Tencent CodeBuddy scaffold, and only the underlying
257
+ LLM changes. The primary table uses one run per model–task pair; task prompts are evenly split
258
+ between English and Chinese (50 each).
259
+
260
+ | Model | Overall score (0–100) | Avg. tokens/task |
261
+ |-------|----------------------:|-----------------:|
262
+ | GPT 5.5 | **74.9** | 299.8k |
263
+ | Claude Opus 4.8 | 74.3 | 318.3k |
264
+ | Claude Sonnet 5 | 73.8 | 457.9k |
265
+ | Gemini 3.1 Pro | 73.7 | 292.4k |
266
+ | Gemini 3.5 Flash | 73.3 | 973.8k |
267
+ | DeepSeek V4 Flash | 73.0 | 419.6k |
268
+ | MiniMax M3 | 71.8 | 714.1k |
269
+ | GLM 5.1 | 71.6 | 355.4k |
270
+ | DeepSeek V4 Pro | 70.6 | 359.3k |
271
+ | Kimi K2.6 | 69.0 | 428.8k |
272
+ | GLM 5.2 | 68.8 | 403.9k |
273
+ | Kimi K2.7 | 68.1 | 407.5k |
274
+ | GPT 5.3 Codex | 66.4 | **271.4k** |
275
+ | Hy3 | 66.0 | 468.7k |
276
+ | MiniMax M2.7 | 63.7 | 501.0k |
277
+ | GLM 5V Turbo | 60.3 | 287.8k |
278
+
279
+ Research highlights:
280
+
281
+ - GPT 5.5 achieves the highest overall score at 74.9.
282
+ - Engine-level results reveal complementary strengths: Claude Opus 4.8 leads PySpark; GPT 5.5
283
+ leads HiveSQL and MySQL; DeepSeek V4 Pro and Gemini 3.5 Flash tie on PrestoSQL/Trino; and
284
+ DeepSeek V4 Flash leads FlinkSQL.
285
+ - Token and tool-call analyses identify models that combine strong task performance with efficient
286
+ agent execution.
287
+ - Repeated-run experiments add execution consistency as a first-class evaluation dimension.
288
+ - Execution-grounded, rule-based graders provide stable, case-specific assessment of both generated
289
+ artifacts and engineering processes.
290
+
291
+ See the [paper](DataClawEval__A_Benchmark_for_Data_Engineering_Agents_in_Real_Industrial_Harness.pdf)
292
+ for complete engine-level results, efficiency and stability analyses, bilingual performance, and all
293
+ task listings.
294
+
295
+ ---
296
+
297
+ ## Project Structure
298
+
299
+ ```
300
+ DataClawEval/
301
+ ├── Dockerfile # Self-contained sandbox (Spark, Flink, Trino, MySQL, Python 3.11)
302
+ ├── requirements.txt # Host-side Python dependencies
303
+ ├── .env.example # Credentials template
304
+ ├── eval/
305
+ │ └── run_batch.py # Evaluation entry point
306
+ ├── script/
307
+ │ ├── prepare.sh # Vendor SDK + build the Docker image
308
+ │ ├── run_batch.sh # Batch runner + report generator
309
+ │ ├── run.sh # Thin wrapper around run_batch.py
310
+ │ └── ... # Metastore / Trino / entrypoint helpers
311
+ ├── src/
312
+ │ ├── agents/ # Agent backends: codebuddy, claudecode, codex, common
313
+ │ └── utils/ # Docker orchestration, DB init, grading, task parsing
314
+ └── tasks/
315
+ ├── offline-compute/ # PySpark, MySQL, HiveSQL, PrestoSQL
316
+ └── online-compute/ # FlinkSQL
317
+ ```
318
+
319
+ ---
320
+
321
+ ## Citation
322
+
323
+ If you use DataClawEval in research, cite the project using [`CITATION.cff`](CITATION.cff). The
324
+ archived software release is available at <https://doi.org/10.5281/zenodo.21621566>.
325
+
326
+ ---
327
+
328
+ ## License
329
+
330
+ Released under the [MIT License](LICENSE).