-
Notifications
You must be signed in to change notification settings - Fork 23
feat: swe bench scorer #342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 22 commits
e550d1e
ad876df
e85f4c0
cfa87a5
00a360a
389c3ee
9d4fe57
71853e2
56a6a7c
9f6a966
165b5dc
e8548dc
827f8e8
916f39b
f295359
fa541d2
a9732c2
0d1df32
e65a8da
bf191e6
71cdf8e
feb66d9
8e61bef
6079043
455751a
899c08c
7ecb12d
52d9f8d
e69fe9e
606497d
72a81b8
e9c1a6a
a63957b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # SWE-bench Accuracy Smoke-Test Runbook | ||
|
|
||
| End-to-end validation for the SWE-bench accuracy pipeline. Unit tests mock all | ||
| subprocesses, so running the real pipeline is the only way to catch Docker, | ||
| HuggingFace access, or mini-swe-agent wiring issues. | ||
|
|
||
| ## 0. Preconditions | ||
|
|
||
| - Docker daemon running on the SWE-bench service host. | ||
| - Docker Hub auth or a pre-seeded image cache on the service host. | ||
| - Network egress to PyPI and HuggingFace Hub from the service host. | ||
| - Endpoint URL reachable from the service host. | ||
| - `uv` binary on PATH (`curl -LsSf https://astral.sh/uv/install.sh | sh`). | ||
| - Parent endpoints env already synced (`uv sync --extra dev` from repo root). | ||
|
|
||
| ## 1. Start the SWE-bench service | ||
|
|
||
| From the repo root: | ||
|
|
||
| ```bash | ||
| uv run --project src/inference_endpoint/evaluation/swebench_service \ | ||
| python -m swebench_service --host 0.0.0.0 --port 18080 | ||
| ``` | ||
|
|
||
| Sanity check: | ||
|
|
||
| ```bash | ||
| curl http://localhost:18080/health | ||
| ``` | ||
|
|
||
| ## 2. End-to-end test (requires live endpoint) | ||
|
|
||
| Run the config for the model under test: | ||
|
|
||
| ```bash | ||
| # Qwen | ||
| uv run inference-endpoint benchmark from-config \ | ||
| --config examples/10_Agentic_Inference/qwen_agentic_benchmark.yaml \ | ||
| --mode acc | ||
|
|
||
| # Kimi | ||
| uv run inference-endpoint benchmark from-config \ | ||
| --config examples/10_Agentic_Inference/kimi_agentic_benchmark.yaml \ | ||
| --mode acc | ||
| ``` | ||
|
|
||
| Both configs include a performance dataset and the SWE-bench accuracy dataset. | ||
| `--mode acc` skips the performance dataset and is required because | ||
| `type: online` configs default to `TestMode.PERF`, which skips accuracy | ||
| datasets. | ||
|
|
||
| Scorer preflight calls the service `/health` endpoint. It does not check Docker | ||
| or pre-pull images on the benchmark client. | ||
|
|
||
| The service is trusted infrastructure. It receives one endpoint URL and optional | ||
| endpoint credentials, runs Docker-backed evaluations, and serves artifacts. For | ||
| non-loopback deployments, bind it on a private network or start it with | ||
| `--auth-token TOKEN` and set | ||
| `accuracy_config.extras.swebench_service_auth_token: TOKEN`. | ||
|
|
||
| Qwen SWE-bench configs may opt into `enable_swebench_toolcall_patch: true` and | ||
| `swebench_template: qwen_tools`. That path builds a temporary minisweagent | ||
| package overlay with replacement files packaged with the service, prepends it to | ||
| `PYTHONPATH` for the agent run, and leaves the installed package untouched. | ||
| Leave this flag unset for Kimi and other non-Qwen runs. | ||
|
|
||
| ## Common failure modes | ||
|
|
||
| | Symptom | Likely cause | Fix | | ||
| | ------------------------------------ | ----------------------------------------- | -------------------------------------------------- | | ||
| | `swebench_service_url is required` | Client config missing service URL | Set `accuracy_config.extras.swebench_service_url` | | ||
| | Service health check fails | Service not running or unreachable | Start the service or fix client-to-service routing | | ||
| | Docker error during `run_evaluation` | Docker daemon not running on service host | Start Docker on the service host and retry | | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| name: "qwen-agentic-benchmark" | ||
| version: "1.0" | ||
| type: "online" | ||
|
|
||
| model_params: | ||
| name: "Qwen/Qwen3.6-35B-A3B" | ||
| temperature: 1.0 | ||
| top_k: 20 | ||
| top_p: 0.95 | ||
| repetition_penalty: 1.0 | ||
| presence_penalty: 1.5 | ||
| max_new_tokens: 8192 | ||
| chat_template_kwargs: | ||
| preserve_thinking: true | ||
|
|
||
| datasets: | ||
| - name: agentic_coding | ||
| type: performance | ||
| path: ./agentic_combined.jsonl | ||
| accuracy_config: | ||
| eval_method: agentic_inference_inline # required benchmark default. | ||
| agentic_inference: | ||
| turn_timeout_s: 14400.0 | ||
| enable_salt: true # do not change. | ||
| inject_tool_delay: true # do not change. | ||
| - name: swe_bench | ||
| type: "accuracy" | ||
| accuracy_config: | ||
| eval_method: "swe_bench_scorer" | ||
| num_repeats: 1 | ||
| extras: | ||
| swebench_service_url: "http://localhost:18080" | ||
| num_instances: 200 | ||
| workers: 10 | ||
| max_eval_workers: 10 | ||
| enable_swebench_toolcall_patch: true | ||
| swebench_template: "qwen_tools" | ||
|
|
||
| settings: | ||
| runtime: | ||
| min_duration_ms: 0 | ||
| max_duration_ms: 36000000 | ||
|
|
||
| load_pattern: | ||
| type: agentic_inference | ||
| target_concurrency: 8 # Submission-specific concurrency. | ||
|
Comment on lines
+38
to
+45
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I saw that Kimi's yaml has this warmup connection settings but Qwen does not, from the code, it looks like this will create a HTTP connection that "warms up" the connection from Endpoint client to the LLM server but does not seem to do much in this case. Kimi effectively does not send any request for this. I believe this should be the same for Qwen as well.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is to bypass some port/connection limit issue that Harshil faced during experiments. I haven't run into this issue from my end, hence not specifying them for Qwen to keep the example yaml minimal. |
||
|
|
||
| endpoint_config: | ||
| endpoints: | ||
| - "http://localhost:30000" | ||
| api_type: openai | ||
|
|
||
| report_dir: logs/qwen_agentic | ||
Uh oh!
There was an error while loading. Please reload this page.