klein-code-bench / docs /BANANA_HARNESS.md
Banaxi-Tech's picture
Release Klein-Code-Bench v0.1.0: 260 validated project-generation tasks
072246b verified
|
Raw History Blame Contribute Delete
1.79 kB
# banana-harness integration
The companion banana-harness adapter uses benchmark name `klein-code-bench`, creates an empty native workspace, and keeps evaluator scenarios in `Task.grading`, outside `Task.public()` and the model prompt. It grades the complete generated project using this package's evaluator. It requires Python 3.11+ and POSIX. No Docker/rootfs backend is used.
From a banana-harness checkout with the Klein adapter:
```bash
# Both checkouts are local; the benchmark evaluator has no runtime dependencies.
python -m pip install -e /path/to/klein-code-bench
python -m pip install -e '/path/to/banana-harness[models,datasets]'
# Endpoint options use the harness's --model-options JSON file.
printf '%s\n' '{"api_base":"http://127.0.0.1:8000/v1","api_key":"local","temperature":0}' > local-model.json
banana run klein-code-bench --allow-downloads --dataset-config easy \
--backend native --model openai/your-local-model \
--model-options local-model.json --output jobs/klein-easy
```
Use the CLI's `--help` to confirm endpoint/model options for the installed harness. The source-loading path also accepts a single subset JSONL file from `klein_code_bench/data/` through `--source`, avoiding dataset downloads. Use `--dataset-config intermediate`, `hard`, `max`, or `default` for the other subsets or all tasks. Pin `--revision` to the HF commit for remote loading. Record generation settings and use one attempt per task.
Generation uses the harness's existing agent and local-model providers. Grading imports `klein_code_bench.runner` lazily; installing or importing banana-harness alone does not download the benchmark. A missing evaluator gives an actionable install error. The optional `klein` dependency installs a wheel pinned to a benchmark dataset commit.