featurebench 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- featurebench-0.1.0/.gitignore +56 -0
- featurebench-0.1.0/.python-version +1 -0
- featurebench-0.1.0/LICENSE +21 -0
- featurebench-0.1.0/PKG-INFO +120 -0
- featurebench-0.1.0/README.md +96 -0
- featurebench-0.1.0/config_example.toml +106 -0
- featurebench-0.1.0/docs/config.md +208 -0
- featurebench-0.1.0/docs/harness_cli_arg.md +94 -0
- featurebench-0.1.0/docs/infer_cli_arg.md +152 -0
- featurebench-0.1.0/docs/pics/logo.png +0 -0
- featurebench-0.1.0/docs/pics/workflow.png +0 -0
- featurebench-0.1.0/docs/pipeline.md +287 -0
- featurebench-0.1.0/featurebench/__init__.py +1 -0
- featurebench-0.1.0/featurebench/classification/__init__.py +5 -0
- featurebench-0.1.0/featurebench/classification/code_classifier.py +1450 -0
- featurebench-0.1.0/featurebench/classification/file_analyzer.py +300 -0
- featurebench-0.1.0/featurebench/classification/llm_top_classifier.py +825 -0
- featurebench-0.1.0/featurebench/classification/p2p_chooser.py +628 -0
- featurebench-0.1.0/featurebench/cli.py +129 -0
- featurebench-0.1.0/featurebench/conversion/__init__.py +0 -0
- featurebench-0.1.0/featurebench/conversion/case_converter.py +1189 -0
- featurebench-0.1.0/featurebench/conversion/eval_code.py +169 -0
- featurebench-0.1.0/featurebench/conversion/llm_prompt_generator.py +392 -0
- featurebench-0.1.0/featurebench/conversion/llm_testfile_adjuster.py +436 -0
- featurebench-0.1.0/featurebench/conversion/render_task.py +82 -0
- featurebench-0.1.0/featurebench/docker/__init__.py +5 -0
- featurebench-0.1.0/featurebench/docker/dynamic_tracer.py +687 -0
- featurebench-0.1.0/featurebench/docker/image_manager.py +1083 -0
- featurebench-0.1.0/featurebench/docker/test_runner.py +388 -0
- featurebench-0.1.0/featurebench/docker/test_scanner.py +517 -0
- featurebench-0.1.0/featurebench/harness/__init__.py +1 -0
- featurebench-0.1.0/featurebench/harness/constants.py +55 -0
- featurebench-0.1.0/featurebench/harness/container.py +369 -0
- featurebench-0.1.0/featurebench/harness/grading.py +143 -0
- featurebench-0.1.0/featurebench/harness/report.py +340 -0
- featurebench-0.1.0/featurebench/harness/review_codes.py +405 -0
- featurebench-0.1.0/featurebench/harness/run_evaluation.py +836 -0
- featurebench-0.1.0/featurebench/harness/runtime.py +592 -0
- featurebench-0.1.0/featurebench/harness/test_parsers.py +290 -0
- featurebench-0.1.0/featurebench/harness/utils.py +272 -0
- featurebench-0.1.0/featurebench/infer/__init__.py +82 -0
- featurebench-0.1.0/featurebench/infer/agents/__init__.py +45 -0
- featurebench-0.1.0/featurebench/infer/agents/base.py +389 -0
- featurebench-0.1.0/featurebench/infer/agents/claude_code.py +250 -0
- featurebench-0.1.0/featurebench/infer/agents/codex.py +345 -0
- featurebench-0.1.0/featurebench/infer/agents/gemini_cli.py +363 -0
- featurebench-0.1.0/featurebench/infer/agents/mini_swe_agent.py +205 -0
- featurebench-0.1.0/featurebench/infer/agents/openhands.py +755 -0
- featurebench-0.1.0/featurebench/infer/config.py +243 -0
- featurebench-0.1.0/featurebench/infer/container.py +660 -0
- featurebench-0.1.0/featurebench/infer/gpu_scheduler.py +141 -0
- featurebench-0.1.0/featurebench/infer/models.py +341 -0
- featurebench-0.1.0/featurebench/infer/output.py +369 -0
- featurebench-0.1.0/featurebench/infer/render_infer_log.py +240 -0
- featurebench-0.1.0/featurebench/infer/run_infer.py +1544 -0
- featurebench-0.1.0/featurebench/infer/runtime.py +430 -0
- featurebench-0.1.0/featurebench/llm/__init__.py +0 -0
- featurebench-0.1.0/featurebench/llm/llm_caller.py +286 -0
- featurebench-0.1.0/featurebench/llm/llm_exceptions.py +31 -0
- featurebench-0.1.0/featurebench/mask/__init__.py +1 -0
- featurebench-0.1.0/featurebench/mask/mask_generator.py +2614 -0
- featurebench-0.1.0/featurebench/mask/mask_validator.py +348 -0
- featurebench-0.1.0/featurebench/mask/signature_extractor.py +423 -0
- featurebench-0.1.0/featurebench/pipeline.py +670 -0
- featurebench-0.1.0/featurebench/post_verify/__init__.py +3 -0
- featurebench-0.1.0/featurebench/post_verify/f2p_validator.py +243 -0
- featurebench-0.1.0/featurebench/post_verify/level2_validator.py +285 -0
- featurebench-0.1.0/featurebench/post_verify/p2p_validator.py +220 -0
- featurebench-0.1.0/featurebench/resources/constants/full_images.txt +24 -0
- featurebench-0.1.0/featurebench/resources/constants/lite_images.txt +13 -0
- featurebench-0.1.0/featurebench/resources/constants/python_example.py +93 -0
- featurebench-0.1.0/featurebench/resources/dockerfiles/python310.py +98 -0
- featurebench-0.1.0/featurebench/resources/dockerfiles/python310_cu118_torch212.py +99 -0
- featurebench-0.1.0/featurebench/resources/dockerfiles/python310_cu121_torch251.py +98 -0
- featurebench-0.1.0/featurebench/resources/dockerfiles/python310_cu121_torch28.py +98 -0
- featurebench-0.1.0/featurebench/resources/dockerfiles/python311.py +98 -0
- featurebench-0.1.0/featurebench/resources/dockerfiles/python311_cu121_torch28.py +98 -0
- featurebench-0.1.0/featurebench/resources/dockerfiles/python312.py +100 -0
- featurebench-0.1.0/featurebench/resources/dockerfiles/python312_cu121_torch251.py +98 -0
- featurebench-0.1.0/featurebench/resources/dockerfiles/python312_cu121_torch26.py +98 -0
- featurebench-0.1.0/featurebench/resources/dockerfiles/python312_cu121_torch28.py +98 -0
- featurebench-0.1.0/featurebench/resources/dockerfiles/python312_torch251.py +98 -0
- featurebench-0.1.0/featurebench/resources/dockerfiles/python39.py +98 -0
- featurebench-0.1.0/featurebench/resources/scripts/dynamic_script/autograd_backward_patch.py +236 -0
- featurebench-0.1.0/featurebench/resources/scripts/dynamic_script/dynamic_script.py +662 -0
- featurebench-0.1.0/featurebench/resources/scripts/dynamic_script/import_hook_patch.py +281 -0
- featurebench-0.1.0/featurebench/resources/scripts/dynamic_script/joblib_patch.py +77 -0
- featurebench-0.1.0/featurebench/resources/scripts/dynamic_script/sitecustomize.py +237 -0
- featurebench-0.1.0/featurebench/resources/scripts/scanner_script.py +121 -0
- featurebench-0.1.0/featurebench/resources/templates/appendix.md.j2 +17 -0
- featurebench-0.1.0/featurebench/resources/templates/black_links.txt.j2 +6 -0
- featurebench-0.1.0/featurebench/resources/templates/config_template.yaml +132 -0
- featurebench-0.1.0/featurebench/resources/templates/level_1.j2 +64 -0
- featurebench-0.1.0/featurebench/resources/templates/level_2.j2 +78 -0
- featurebench-0.1.0/featurebench/resources/templates/llm_prompt_templates.yaml +107 -0
- featurebench-0.1.0/featurebench/scripts/cal_eval_outputs.py +628 -0
- featurebench-0.1.0/featurebench/scripts/post_filter_cases.py +592 -0
- featurebench-0.1.0/featurebench/scripts/pull_images.py +208 -0
- featurebench-0.1.0/featurebench/utils/__init__.py +1 -0
- featurebench-0.1.0/featurebench/utils/command_utils.py +37 -0
- featurebench-0.1.0/featurebench/utils/config.py +349 -0
- featurebench-0.1.0/featurebench/utils/logger.py +688 -0
- featurebench-0.1.0/featurebench/utils/parser/__init__.py +0 -0
- featurebench-0.1.0/featurebench/utils/parser/pytest_parser.py +252 -0
- featurebench-0.1.0/featurebench/utils/repo_manager.py +404 -0
- featurebench-0.1.0/featurebench/utils/storage.py +1271 -0
- featurebench-0.1.0/featurebench/utils/utils.py +1145 -0
- featurebench-0.1.0/pyproject.toml +43 -0
- featurebench-0.1.0/uv.lock +1990 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Custom
|
|
2
|
+
download_cache/*
|
|
3
|
+
scripts/*
|
|
4
|
+
cases_filter/*
|
|
5
|
+
.vscode/
|
|
6
|
+
*output/
|
|
7
|
+
*outputs/
|
|
8
|
+
*log/
|
|
9
|
+
*logs/
|
|
10
|
+
featurebench/resources/repos
|
|
11
|
+
featurebench/resources/constants/*
|
|
12
|
+
!featurebench/resources/constants/python_example.py
|
|
13
|
+
!featurebench/resources/constants/full_images.txt
|
|
14
|
+
!featurebench/resources/constants/lite_images.txt
|
|
15
|
+
config.toml
|
|
16
|
+
tmp/
|
|
17
|
+
runs/
|
|
18
|
+
OpenHands/
|
|
19
|
+
.cursor/*
|
|
20
|
+
.github/skills/
|
|
21
|
+
ms-swift/
|
|
22
|
+
|
|
23
|
+
# Environments
|
|
24
|
+
.env
|
|
25
|
+
.venv
|
|
26
|
+
env/
|
|
27
|
+
venv/
|
|
28
|
+
ENV/
|
|
29
|
+
env.bak/
|
|
30
|
+
venv.bak/
|
|
31
|
+
|
|
32
|
+
# Unit test / coverage reports
|
|
33
|
+
htmlcov/
|
|
34
|
+
.tox/
|
|
35
|
+
.nox/
|
|
36
|
+
.coverage
|
|
37
|
+
.coverage.*
|
|
38
|
+
.cache
|
|
39
|
+
nosetests.xml
|
|
40
|
+
coverage.xml
|
|
41
|
+
*.cover
|
|
42
|
+
*.py,cover
|
|
43
|
+
.hypothesis/
|
|
44
|
+
.pytest_cache/
|
|
45
|
+
cover/
|
|
46
|
+
|
|
47
|
+
# Python-generated files
|
|
48
|
+
__pycache__/
|
|
49
|
+
*.py[oc]
|
|
50
|
+
build/
|
|
51
|
+
dist/
|
|
52
|
+
wheels/
|
|
53
|
+
*.egg-info
|
|
54
|
+
|
|
55
|
+
# Virtual environments
|
|
56
|
+
.venv
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Carlos E Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, Karthik R Narasimhan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: featurebench
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: FeatureBench Pipeline - A test-driven data generation pipeline for building and evaluating feature-level coding benchmarks
|
|
5
|
+
License-File: LICENSE
|
|
6
|
+
Requires-Python: >=3.12
|
|
7
|
+
Requires-Dist: datasets>=3.3.3
|
|
8
|
+
Requires-Dist: docker>=5.0.3
|
|
9
|
+
Requires-Dist: filelock>=3.20.0
|
|
10
|
+
Requires-Dist: huggingface-hub>=0.26.5
|
|
11
|
+
Requires-Dist: jinja2>=3.1.6
|
|
12
|
+
Requires-Dist: matplotlib>=3.10.7
|
|
13
|
+
Requires-Dist: openai>=2.6.1
|
|
14
|
+
Requires-Dist: pandas>=2.2.3
|
|
15
|
+
Requires-Dist: pyarrow>=18.1.0
|
|
16
|
+
Requires-Dist: pytest>=8.4.2
|
|
17
|
+
Requires-Dist: pyyaml>=6.0.3
|
|
18
|
+
Requires-Dist: rich>=13.0.0
|
|
19
|
+
Requires-Dist: scipy>=1.16.3
|
|
20
|
+
Requires-Dist: seaborn>=0.13.2
|
|
21
|
+
Requires-Dist: toml>=0.10.2
|
|
22
|
+
Requires-Dist: tqdm>=4.67.1
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
<p align="center">
|
|
26
|
+
<img src="docs/pics/logo.png" style="height: 10em" alt="logo" />
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
<p align="center">
|
|
30
|
+
<a href="https://arxiv.org/abs/2602.10975"><img src="https://img.shields.io/badge/arXiv-2602.10975-b31b1b.svg" alt="arXiv"></a>
|
|
31
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License"></a>
|
|
32
|
+
<a href="https://hub.docker.com/u/libercoders"><img src="https://img.shields.io/badge/DockerHub-Images-blue.svg" alt="DockerHub"></a>
|
|
33
|
+
<a href="https://huggingface.co/datasets/LiberCoders/FeatureBench"><img src="https://img.shields.io/badge/HuggingFace-datasets-yellow.svg" alt="HuggingFace"></a>
|
|
34
|
+
<a href="https://LiberCoders.github.io/FeatureBench/"><img src="https://img.shields.io/badge/Leaderboard-view-purple.svg" alt="Leaderboard"></a>
|
|
35
|
+
</p>
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
FeatureBench is a test-driven data generation and evaluation pipeline for feature-level coding benchmarks.
|
|
40
|
+
It provides a unified CLI to run inference, evaluation, and dataset generation.
|
|
41
|
+
|
|
42
|
+
## 📰 News
|
|
43
|
+
|
|
44
|
+
🎁 **2026.02.06**: We now support one-click inference for mainstream agent frameworks, including **OpenHands, Claude Code, Codex, Gemini CLI, and mini-swe-agent**. All supported agent frameworks can be found [here](featurebench/infer/agents/). We have also open-sourced the FeatureBench **data pipeline**.
|
|
45
|
+
|
|
46
|
+
## 🚀 Quickstart
|
|
47
|
+
|
|
48
|
+
**Prerequisites:**
|
|
49
|
+
- [uv](https://docs.astral.sh/uv/getting-started/installation/) for Python environment management
|
|
50
|
+
- [docker](https://docs.docker.com/engine/install/) for reproducible builds and evaluation
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# pypi
|
|
54
|
+
pip install featurebench
|
|
55
|
+
# or uv add featurebench
|
|
56
|
+
|
|
57
|
+
# local
|
|
58
|
+
git clone https://github.com/LiberCoders/FeatureBench.git
|
|
59
|
+
cd FeatureBench
|
|
60
|
+
uv sync
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Configure:**
|
|
64
|
+
```bash
|
|
65
|
+
cp config_example.toml config.toml
|
|
66
|
+
```
|
|
67
|
+
See [docs/config.md](docs/config.md) for a comprehensive reference (harness, infer, data pipeline) with examples.
|
|
68
|
+
|
|
69
|
+
**Optional: pre-pull images to reduce network variance:**
|
|
70
|
+
```bash
|
|
71
|
+
fb pull --mode lite # lite split image list (13 images)
|
|
72
|
+
fb pull --mode full # full split image list (24 images)
|
|
73
|
+
fb pull --mode /path/to/images.txt # one image name per line
|
|
74
|
+
|
|
75
|
+
# full list: featurebench/resources/constants/full_images.txt
|
|
76
|
+
# lite list: featurebench/resources/constants/lite_images.txt
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Run inference:**
|
|
80
|
+
```bash
|
|
81
|
+
fb infer \
|
|
82
|
+
--config-path config.toml \
|
|
83
|
+
--agent mini_swe_agent \
|
|
84
|
+
--model openai/qwen3-coder-480b-a35b-instruct \
|
|
85
|
+
--split lite
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Run evaluation:**
|
|
89
|
+
```bash
|
|
90
|
+
fb eval \
|
|
91
|
+
-p runs/<timestamp>/output.jsonl \
|
|
92
|
+
--split lite
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## 🧭 CLI Overview
|
|
96
|
+
|
|
97
|
+
`fb` provides three core commands:
|
|
98
|
+
- `fb infer` runs `featurebench.infer.run_infer` (docs: [docs/infer_cli_arg.md](docs/infer_cli_arg.md))
|
|
99
|
+
- `fb eval` runs `featurebench.harness.run_evaluation` (docs: [docs/harness_cli_arg.md](docs/harness_cli_arg.md))
|
|
100
|
+
- `fb data` runs `featurebench.pipeline` (docs: [docs/pipeline.md](docs/pipeline.md))
|
|
101
|
+
|
|
102
|
+
## ✍️ Citation
|
|
103
|
+
|
|
104
|
+
If you found FeatureBench useful, please cite us as:
|
|
105
|
+
|
|
106
|
+
```bibtex
|
|
107
|
+
@misc{zhou2026featurebenchbenchmarkingagenticcoding,
|
|
108
|
+
title={FeatureBench: Benchmarking Agentic Coding for Complex Feature Development},
|
|
109
|
+
author={Qixing Zhou and Jiacheng Zhang and Haiyang Wang and Rui Hao and Jiahe Wang and Minghao Han and Yuxue Yang and Shuzhe Wu and Feiyang Pan and Lue Fan and Dandan Tu and Zhaoxiang Zhang},
|
|
110
|
+
year={2026},
|
|
111
|
+
eprint={2602.10975},
|
|
112
|
+
archivePrefix={arXiv},
|
|
113
|
+
primaryClass={cs.SE},
|
|
114
|
+
url={https://arxiv.org/abs/2602.10975},
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## 📧 Contact
|
|
119
|
+
|
|
120
|
+
If you have any questions, feel free to contact [qixingzhou1125@gmail.com](mailto:qixingzhou1125@gmail.com) or [zjcheng2022@gmail.com](mailto:zjcheng2022@gmail.com).
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/pics/logo.png" style="height: 10em" alt="logo" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://arxiv.org/abs/2602.10975"><img src="https://img.shields.io/badge/arXiv-2602.10975-b31b1b.svg" alt="arXiv"></a>
|
|
7
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License"></a>
|
|
8
|
+
<a href="https://hub.docker.com/u/libercoders"><img src="https://img.shields.io/badge/DockerHub-Images-blue.svg" alt="DockerHub"></a>
|
|
9
|
+
<a href="https://huggingface.co/datasets/LiberCoders/FeatureBench"><img src="https://img.shields.io/badge/HuggingFace-datasets-yellow.svg" alt="HuggingFace"></a>
|
|
10
|
+
<a href="https://LiberCoders.github.io/FeatureBench/"><img src="https://img.shields.io/badge/Leaderboard-view-purple.svg" alt="Leaderboard"></a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
FeatureBench is a test-driven data generation and evaluation pipeline for feature-level coding benchmarks.
|
|
16
|
+
It provides a unified CLI to run inference, evaluation, and dataset generation.
|
|
17
|
+
|
|
18
|
+
## 📰 News
|
|
19
|
+
|
|
20
|
+
🎁 **2026.02.06**: We now support one-click inference for mainstream agent frameworks, including **OpenHands, Claude Code, Codex, Gemini CLI, and mini-swe-agent**. All supported agent frameworks can be found [here](featurebench/infer/agents/). We have also open-sourced the FeatureBench **data pipeline**.
|
|
21
|
+
|
|
22
|
+
## 🚀 Quickstart
|
|
23
|
+
|
|
24
|
+
**Prerequisites:**
|
|
25
|
+
- [uv](https://docs.astral.sh/uv/getting-started/installation/) for Python environment management
|
|
26
|
+
- [docker](https://docs.docker.com/engine/install/) for reproducible builds and evaluation
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# pypi
|
|
30
|
+
pip install featurebench
|
|
31
|
+
# or uv add featurebench
|
|
32
|
+
|
|
33
|
+
# local
|
|
34
|
+
git clone https://github.com/LiberCoders/FeatureBench.git
|
|
35
|
+
cd FeatureBench
|
|
36
|
+
uv sync
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Configure:**
|
|
40
|
+
```bash
|
|
41
|
+
cp config_example.toml config.toml
|
|
42
|
+
```
|
|
43
|
+
See [docs/config.md](docs/config.md) for a comprehensive reference (harness, infer, data pipeline) with examples.
|
|
44
|
+
|
|
45
|
+
**Optional: pre-pull images to reduce network variance:**
|
|
46
|
+
```bash
|
|
47
|
+
fb pull --mode lite # lite split image list (13 images)
|
|
48
|
+
fb pull --mode full # full split image list (24 images)
|
|
49
|
+
fb pull --mode /path/to/images.txt # one image name per line
|
|
50
|
+
|
|
51
|
+
# full list: featurebench/resources/constants/full_images.txt
|
|
52
|
+
# lite list: featurebench/resources/constants/lite_images.txt
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Run inference:**
|
|
56
|
+
```bash
|
|
57
|
+
fb infer \
|
|
58
|
+
--config-path config.toml \
|
|
59
|
+
--agent mini_swe_agent \
|
|
60
|
+
--model openai/qwen3-coder-480b-a35b-instruct \
|
|
61
|
+
--split lite
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Run evaluation:**
|
|
65
|
+
```bash
|
|
66
|
+
fb eval \
|
|
67
|
+
-p runs/<timestamp>/output.jsonl \
|
|
68
|
+
--split lite
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## 🧭 CLI Overview
|
|
72
|
+
|
|
73
|
+
`fb` provides three core commands:
|
|
74
|
+
- `fb infer` runs `featurebench.infer.run_infer` (docs: [docs/infer_cli_arg.md](docs/infer_cli_arg.md))
|
|
75
|
+
- `fb eval` runs `featurebench.harness.run_evaluation` (docs: [docs/harness_cli_arg.md](docs/harness_cli_arg.md))
|
|
76
|
+
- `fb data` runs `featurebench.pipeline` (docs: [docs/pipeline.md](docs/pipeline.md))
|
|
77
|
+
|
|
78
|
+
## ✍️ Citation
|
|
79
|
+
|
|
80
|
+
If you found FeatureBench useful, please cite us as:
|
|
81
|
+
|
|
82
|
+
```bibtex
|
|
83
|
+
@misc{zhou2026featurebenchbenchmarkingagenticcoding,
|
|
84
|
+
title={FeatureBench: Benchmarking Agentic Coding for Complex Feature Development},
|
|
85
|
+
author={Qixing Zhou and Jiacheng Zhang and Haiyang Wang and Rui Hao and Jiahe Wang and Minghao Han and Yuxue Yang and Shuzhe Wu and Feiyang Pan and Lue Fan and Dandan Tu and Zhaoxiang Zhang},
|
|
86
|
+
year={2026},
|
|
87
|
+
eprint={2602.10975},
|
|
88
|
+
archivePrefix={arXiv},
|
|
89
|
+
primaryClass={cs.SE},
|
|
90
|
+
url={https://arxiv.org/abs/2602.10975},
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## 📧 Contact
|
|
95
|
+
|
|
96
|
+
If you have any questions, feel free to contact [qixingzhou1125@gmail.com](mailto:qixingzhou1125@gmail.com) or [zjcheng2022@gmail.com](mailto:zjcheng2022@gmail.com).
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# ==============================================================================
|
|
2
|
+
# Global Environment Variables (injected into each container at runtime)
|
|
3
|
+
# ==============================================================================
|
|
4
|
+
[env_vars]
|
|
5
|
+
HF_ENDPOINT=""
|
|
6
|
+
HF_TOKEN=""
|
|
7
|
+
GITHUB_TOKEN=""
|
|
8
|
+
|
|
9
|
+
# ==============================================================================
|
|
10
|
+
# DataPipeline Configuration
|
|
11
|
+
# ==============================================================================
|
|
12
|
+
|
|
13
|
+
# LLM Basic Configuration
|
|
14
|
+
[llm_config]
|
|
15
|
+
llm_name="" # e.g., "azure-gpt-5-fy0828" / "local"
|
|
16
|
+
llm_temperature=0.0
|
|
17
|
+
llm_max_tokens=65536 # Maximum output tokens (-1 = no limit)
|
|
18
|
+
timeout=180
|
|
19
|
+
|
|
20
|
+
[llm.azure-gpt-5-fy0828]
|
|
21
|
+
model = "azure/gpt-5-fy0828"
|
|
22
|
+
api_key = ""
|
|
23
|
+
base_url = ""
|
|
24
|
+
|
|
25
|
+
[llm.claude-sonnet-4-20250514]
|
|
26
|
+
model = "claude-sonnet-4-20250514"
|
|
27
|
+
api_key = ""
|
|
28
|
+
base_url = [
|
|
29
|
+
"",
|
|
30
|
+
"",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[llm.local]
|
|
34
|
+
backend = "vllm" # Backend type: vllm
|
|
35
|
+
api_key = "" # Optional: API key passed to vLLM server
|
|
36
|
+
base_url = "http://localhost:8080/v1" # vLLM server URL
|
|
37
|
+
|
|
38
|
+
# ==============================================================================
|
|
39
|
+
# Inference Agent Configuration
|
|
40
|
+
# ==============================================================================
|
|
41
|
+
|
|
42
|
+
# Inference runtime settings
|
|
43
|
+
[infer]
|
|
44
|
+
# Optional: Host cache directory for agent downloads; will be mounted to /download inside containers
|
|
45
|
+
# Set to empty to disable cache mount (each container will re-download/install)
|
|
46
|
+
# Use an absolute path here
|
|
47
|
+
download_cache_dir="/path/to/FeatureBench/download_cache"
|
|
48
|
+
|
|
49
|
+
# OpenHands Agent Configuration
|
|
50
|
+
[infer_config.openhands]
|
|
51
|
+
# Required: LLM API Key (supports OpenAI/Anthropic/Azure, etc.)
|
|
52
|
+
LLM_API_KEY = ""
|
|
53
|
+
# Optional: LLM API Base URL
|
|
54
|
+
LLM_BASE_URL = ""
|
|
55
|
+
# Optional: Lock OpenHands version (leave empty to use latest)
|
|
56
|
+
OPENHANDS_VERSION = "0.62.0"
|
|
57
|
+
# Optional: Reasoning effort for OpenAI o-series models
|
|
58
|
+
LLM_REASONING_EFFORT = ""
|
|
59
|
+
# Azure API Version (required for Azure models only)
|
|
60
|
+
LLM_API_VERSION = ""
|
|
61
|
+
# Optional: OpenHands agent max iterations (step limit). Upstream default is 500.
|
|
62
|
+
OPENHANDS_MAX_ITERATIONS = ""
|
|
63
|
+
# Optional: Save llm completions if true
|
|
64
|
+
SAVE_COMPLETIONS = false
|
|
65
|
+
# Optional: Enable OpenHands condensation (default false). Set true to enable condensers.
|
|
66
|
+
ENABLE_CONDENSER = false
|
|
67
|
+
# Optional: Render infer.log mode (compact|full)
|
|
68
|
+
INFER_LOG_RENDER_MODE = "full"
|
|
69
|
+
|
|
70
|
+
# Claude Code Agent Configuration
|
|
71
|
+
[infer_config.claude_code]
|
|
72
|
+
# Required: Anthropic API Key
|
|
73
|
+
ANTHROPIC_API_KEY = ""
|
|
74
|
+
# Optional: Custom API Base URL
|
|
75
|
+
ANTHROPIC_BASE_URL = ""
|
|
76
|
+
# Optional: Lock Claude Code version (leave empty to use latest)
|
|
77
|
+
CLAUDE_CODE_VERSION = ""
|
|
78
|
+
|
|
79
|
+
# Gemini CLI Agent Configuration
|
|
80
|
+
[infer_config.gemini_cli]
|
|
81
|
+
GEMINI_API_KEY = ""
|
|
82
|
+
GOOGLE_GEMINI_BASE_URL = ""
|
|
83
|
+
# Optional: Lock Gemini CLI version (leave empty to use latest)
|
|
84
|
+
GEMINI_CLI_VERSION = ""
|
|
85
|
+
|
|
86
|
+
# Codex Agent Configuration (Azure OpenAI supported)
|
|
87
|
+
[infer_config.codex]
|
|
88
|
+
# Required: OpenAI API Key
|
|
89
|
+
OPENAI_API_KEY = ""
|
|
90
|
+
# Optional: Custom API Base URL
|
|
91
|
+
OPENAI_BASE_URL = ""
|
|
92
|
+
# Optional: Reasoning effort level for Codex reasoning models; empty defaults to "medium"
|
|
93
|
+
CODEX_REASONING_EFFORT = ""
|
|
94
|
+
# Optional: Lock Codex version (leave empty to use latest)
|
|
95
|
+
CODEX_VERSION = ""
|
|
96
|
+
|
|
97
|
+
# mini_swe_agent Configuration
|
|
98
|
+
[infer_config.mini_swe_agent]
|
|
99
|
+
# Required: Unified mini_swe_agent API key
|
|
100
|
+
MSWEA_API_KEY = ""
|
|
101
|
+
# Optional: Base URL passed through to provider envs
|
|
102
|
+
MSWEA_BASE_URL = ""
|
|
103
|
+
# Optional: Cost tracking mode (default behavior in FB adapter is ignore_errors)
|
|
104
|
+
MSWEA_COST_TRACKING = ""
|
|
105
|
+
# Optional: Lock mini_swe_agent version (leave empty to use latest)
|
|
106
|
+
MINI_SWE_AGENT_VERSION = ""
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# FeatureBench Configuration Guide: config.toml
|
|
2
|
+
|
|
3
|
+
FeatureBench has three major workflows:
|
|
4
|
+
|
|
5
|
+
- **harness (evaluation)**: runs tests on inference outputs and produces a report.
|
|
6
|
+
- **infer (inference)**: runs different agents on FeatureBench benchmark tasks to generate patches.
|
|
7
|
+
- **data pipeline (dataset generation)**: builds FeatureBench-style tasks automatically from real repositories.
|
|
8
|
+
|
|
9
|
+
The repo-root `config.toml` is the single configuration file that manages what all three workflows need at runtime.
|
|
10
|
+
|
|
11
|
+
This guide uses the example configuration [config_example.toml](../config_example.toml) as the source of truth. It explains every field and how to use it, organized into **harness / infer / data pipeline**, and provides examples.
|
|
12
|
+
|
|
13
|
+
## Quickstart
|
|
14
|
+
|
|
15
|
+
Copy the example config:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
cp config_example.toml config.toml
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### [env_vars] (global environment variables used by harness / infer / pipeline)
|
|
22
|
+
|
|
23
|
+
`[env_vars]` is the global environment variable section. Values here will be injected into every runnable container.
|
|
24
|
+
|
|
25
|
+
Example:
|
|
26
|
+
|
|
27
|
+
```toml
|
|
28
|
+
[env_vars]
|
|
29
|
+
HF_ENDPOINT = ""
|
|
30
|
+
HF_TOKEN = ""
|
|
31
|
+
GITHUB_TOKEN = ""
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## A. Harness
|
|
37
|
+
|
|
38
|
+
The core idea of harness is: read the `output.jsonl` produced by infer, apply each patch to the corresponding repository image, run tests, and generate evaluation results.
|
|
39
|
+
|
|
40
|
+
When harness loads the HuggingFace dataset during evaluation, it uses `HF_ENDPOINT` from `[env_vars]`.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## B. Infer
|
|
45
|
+
|
|
46
|
+
The core idea of infer is: run an agent inside a container (e.g. `claude_code/openhands/codex/mini_swe_agent/...`) and let it generate a patch for each task.
|
|
47
|
+
|
|
48
|
+
How infer reads `config.toml`:
|
|
49
|
+
|
|
50
|
+
- Load global `[env_vars]` first
|
|
51
|
+
- Then load `[infer]` (inference runtime settings)
|
|
52
|
+
- Then load the current agent’s `[infer_config.<agent>]`
|
|
53
|
+
- Merge `[env_vars]` and `[infer_config.<agent>]`, and inject them into the inference container as environment variables
|
|
54
|
+
|
|
55
|
+
### B1. [infer]
|
|
56
|
+
|
|
57
|
+
```toml
|
|
58
|
+
[infer]
|
|
59
|
+
download_cache_dir = "/abs/path/to/FeatureBench/download_cache"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
- `download_cache_dir`: host-side cache directory that will be mounted into the container at `/download`.
|
|
63
|
+
- Purpose: speed up agent installs/downloads (e.g. npm cache).
|
|
64
|
+
- Empty means no mount (each container downloads on its own; usually slower).
|
|
65
|
+
|
|
66
|
+
### B2. [infer_config.openhands]
|
|
67
|
+
|
|
68
|
+
```toml
|
|
69
|
+
[infer_config.openhands]
|
|
70
|
+
LLM_API_KEY = ""
|
|
71
|
+
LLM_BASE_URL = "" # Optional
|
|
72
|
+
LLM_API_VERSION = "" # Optional: Azure only
|
|
73
|
+
OPENHANDS_VERSION = "" # Optional: pin OpenHands version (empty usually means default/latest)
|
|
74
|
+
SAVE_COMPLETIONS = false # Optional: whether to save LLM completions (true/false)
|
|
75
|
+
INFER_LOG_RENDER_MODE = "compact" # Optional: compact|full for infer.log rendering
|
|
76
|
+
|
|
77
|
+
LLM_REASONING_EFFORT = "" # Optional: Reasoning effort for OpenAI o-series models
|
|
78
|
+
OPENHANDS_MAX_ITERATIONS = "" # Optional: OpenHands agent max iterations (step limit). Upstream default is 500.
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Example 1: OpenHands + OpenAI
|
|
83
|
+
|
|
84
|
+
```toml
|
|
85
|
+
[infer_config.openhands]
|
|
86
|
+
LLM_API_KEY = "<your-openai-api-key>"
|
|
87
|
+
LLM_BASE_URL = "" # Fill if needed
|
|
88
|
+
LLM_API_VERSION = ""
|
|
89
|
+
OPENHANDS_VERSION = "0.62.0"
|
|
90
|
+
SAVE_COMPLETIONS = false
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Example 2: OpenHands + Azure OpenAI
|
|
94
|
+
|
|
95
|
+
```toml
|
|
96
|
+
[infer_config.openhands]
|
|
97
|
+
LLM_API_KEY = "<your-azure-api-key>"
|
|
98
|
+
LLM_BASE_URL = "https://<resource>.openai.azure.com"
|
|
99
|
+
LLM_API_VERSION = "2024-xx-xx"
|
|
100
|
+
OPENHANDS_VERSION = "0.62.0"
|
|
101
|
+
SAVE_COMPLETIONS = false
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### B3. [infer_config.claude_code]
|
|
105
|
+
|
|
106
|
+
```toml
|
|
107
|
+
[infer_config.claude_code]
|
|
108
|
+
ANTHROPIC_API_KEY = "" # Required
|
|
109
|
+
ANTHROPIC_BASE_URL = "" # Optional
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### B4. [infer_config.gemini_cli]
|
|
113
|
+
|
|
114
|
+
```toml
|
|
115
|
+
[infer_config.gemini_cli]
|
|
116
|
+
GEMINI_API_KEY = "" # Required
|
|
117
|
+
GOOGLE_GEMINI_BASE_URL = "" # Optional
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### B5. [infer_config.codex]
|
|
121
|
+
|
|
122
|
+
```toml
|
|
123
|
+
[infer_config.codex]
|
|
124
|
+
OPENAI_API_KEY = "" # Required
|
|
125
|
+
OPENAI_BASE_URL = "" # Optional
|
|
126
|
+
CODEX_REASONING_EFFORT = "" # Optional: empty defaults to medium
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Example 1: Codex + OpenAI
|
|
130
|
+
|
|
131
|
+
```toml
|
|
132
|
+
[infer_config.codex]
|
|
133
|
+
OPENAI_API_KEY = "<your-openai-api-key>"
|
|
134
|
+
OPENAI_BASE_URL = ""
|
|
135
|
+
CODEX_REASONING_EFFORT = "medium"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Example 2: Codex + Azure OpenAI
|
|
139
|
+
|
|
140
|
+
```toml
|
|
141
|
+
[infer_config.codex]
|
|
142
|
+
OPENAI_API_KEY = "<your-azure-api-key>"
|
|
143
|
+
OPENAI_BASE_URL = "https://<resource>.openai.azure.com"
|
|
144
|
+
CODEX_REASONING_EFFORT = "high"
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### B6. [infer_config.mini_swe_agent]
|
|
148
|
+
|
|
149
|
+
```toml
|
|
150
|
+
[infer_config.mini_swe_agent]
|
|
151
|
+
MSWEA_API_KEY = ""
|
|
152
|
+
MSWEA_BASE_URL = ""
|
|
153
|
+
MSWEA_COST_TRACKING = ""
|
|
154
|
+
MINI_SWE_AGENT_VERSION = ""
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## C. Data Pipeline
|
|
160
|
+
|
|
161
|
+
the core idea of the data pipeline is: call an LLM + access repositories/platforms to automatically generate or process data (tasks, prompts, test files, etc.).
|
|
162
|
+
|
|
163
|
+
It mainly depends on two types of config:
|
|
164
|
+
|
|
165
|
+
- `[env_vars]`: platform/repo access related
|
|
166
|
+
- `[llm_config]` + `[llm.<name>]`: select an LLM configuration for the pipeline
|
|
167
|
+
|
|
168
|
+
### C1. [llm_config]
|
|
169
|
+
|
|
170
|
+
```toml
|
|
171
|
+
[llm_config]
|
|
172
|
+
llm_name = "" # Select the name of one [llm.<name>]
|
|
173
|
+
llm_temperature = 0.0 # Default temperature (some models/backends may ignore it, e.g. some GPT-5 paths)
|
|
174
|
+
llm_max_tokens = 65536 # Max output tokens; set -1 to "not send max_tokens/max_completion_tokens", backend decides the default behavior
|
|
175
|
+
timeout = 180 # Request timeout (seconds)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### C2. [llm.\<name>]
|
|
179
|
+
|
|
180
|
+
Example (Azure OpenAI):
|
|
181
|
+
|
|
182
|
+
```toml
|
|
183
|
+
[llm.azure-o3-fy1]
|
|
184
|
+
model = "azure/o3-fy1"
|
|
185
|
+
api_key = "..."
|
|
186
|
+
base_url = "https://<resource>.openai.azure.com"
|
|
187
|
+
api_version = "2025-04-01-preview"
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Example (Anthropic):
|
|
191
|
+
|
|
192
|
+
```toml
|
|
193
|
+
[llm.claude-sonnet-4-20250514]
|
|
194
|
+
model = "claude-sonnet-4-20250514"
|
|
195
|
+
api_key = "..."
|
|
196
|
+
base_url = [
|
|
197
|
+
"https://...",
|
|
198
|
+
"https://..."
|
|
199
|
+
] # Supports multiple URLs; will retry the list on failure
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Example (local vLLM):
|
|
203
|
+
|
|
204
|
+
```toml
|
|
205
|
+
[llm.local]
|
|
206
|
+
backend = "vllm"
|
|
207
|
+
base_url = "http://localhost:8080/v1"
|
|
208
|
+
```
|