[WIP] add SWE-bench Lite accuracy eval#1947
Conversation
lm-eval cannot score SWE-bench (no repo-level Docker test executor), so this reuses lm-eval for patch *generation* and adds a scoring step that runs the official swebench harness, emitting an lm-eval-shaped results JSON so the existing collect/validate pipeline works unchanged. - swebench_lite.yaml: lm-eval generate_until task over SWE-bench Lite - swebench_score.py: diff extraction -> predictions.jsonl -> swebench harness -> resolved-rate -> lm-eval-shaped results; offline --report/--predictions-only - benchmark_lib.sh: run_swebench_eval + --framework swebench dispatch - collect_eval_results.py: recognize 'resolved' filter as the primary score - thresholds.json: placeholder swebench_lite entry (needs calibration) - EVALS.md: document the new framework + task - test_swebench_eval.py: unit + integration tests
|
Thanks for the contribution! For vLLM & SGLang, please ensure that your recipes is similar to the official vLLM recipes and/or the SGLang cookbook If it is not, please create a PR first before we can merge your single node PR into the master branch. Let's ensure that the documentation is first class such that the entire ML community can benefit from your hard work! Thank you PR authors are responsible for ensuring that after merging, all GitHub Action jobs fully pass. A lot of the time, failures are just flakes and simply re-running the failed jobs will fix it. If re-running failed jobs is attempted, PR authors are responsible for ensuring it passes. See GitHub's docs on re-running failed jobs: https://docs.github.com/en/actions/how-tos/manage-workflow-runs/re-run-workflows-and-jobs#re-running-failed-jobs-in-a-workflow As a rule of thumb, generally, PR authors should request a review & get a PR approval from the respective companies' CODEOWNERS before requesting a review from core maintainers. If additional help is needed, PR authors can reach out to core maintainers over Slack. 感谢你的贡献!对于 vLLM 与 SGLang,请确保你的 recipe 与官方 vLLM recipes 和/或 SGLang cookbook 保持一致 如果不一致,请先创建一个 PR,之后我们才能将你的单节点 PR 合并到 master 分支。让我们确保文档保持一流水准,使整个 ML 社区都能从你的辛勤工作中受益!谢谢 PR 作者有责任确保合并后所有 GitHub Action 任务完全通过。 很多时候失败只是偶发抖动(flake),重新运行失败的任务即可解决。如果选择重新运行失败的任务,PR 作者有责任确保其最终通过。参见 GitHub 关于重新运行失败任务的文档:https://docs.github.com/en/actions/how-tos/manage-workflow-runs/re-run-workflows-and-jobs#re-running-failed-jobs-in-a-workflow 一般而言,PR 作者应先向相应公司的 CODEOWNERS 请求审阅并获得 PR 批准,然后再请求核心维护者审阅。 如需更多帮助,PR 作者可通过 Slack 联系核心维护者。 |
Addresses CodeQL (github-code-quality) finding on the PR.
- swebench_score.py: bound the bare-diff fallback to the diff body so trailing prose after a patch can't be glued on (would fail git apply -> unresolved, suppressing resolved-rate). Add _trim_to_diff_body + regression tests. - benchmark_lib.sh: derive the scoring dataset from the generation YAML's dataset_path so generation/scoring can't diverge; SWEBENCH_DATASET (if set) must match or it fails fast. Update docstring + EVALS.md. CodeQL unused-import (Any) already fixed in 4886287.
Adds a lightweight, eval-only PR-comment trigger (no perf sweep): /run-evals <eval> <config-key> [conc] [master-config] e.g. /run-evals swebench_lite dsr1-fp4-b200-sglang 16 - benchmark_lib.sh: EVAL_FRAMEWORK env now wins over run_eval's --framework arg so an eval-only run can override the recipes' hardcoded lm-eval (default behavior unchanged when env unset). - e2e-tests.yml / benchmark-tmpl.yml / benchmark-multinode-tmpl.yml: thread new eval-framework + eval-task inputs -> EVAL_FRAMEWORK / EVAL_TASKS_DIR env. - run-evals.yml: new comment workflow (mirrors pr-comment-sweep.yml auth/SHA-pin/ reply), maps <eval> -> framework+task, infers nvidia/amd master config from the config-key HW token, builds 'test-config ... --evals-only', calls e2e-tests.yml. - test_run_eval_dispatch.py: unit tests for the env-override dispatch. NOTE: swebench scoring needs Docker on the eval runner (else SWEBENCH_SKIP_SCORE).
[WIP]
lm-eval cannot score SWE-bench, so this reuses lm-eval for patch generation and adds a scoring step that runs the official swebench harness, emitting an lm-eval-shaped results JSON so the existing collect/validate pipeline works unchanged.