SWE-bench
2,294 real-world GitHub issues and their verified patches from 12 popular Python repositories. The gold standard benchmark for evaluating LLMs on practical software engineering tasks — writing actual code that resolves real bugs in production codebases.
加载
from datasets import load_dataset
ds = load_dataset("princeton-nlp/SWE-bench")预览示例数据
{
"instance_id": "astropy__astropy-12907",
"repo": "astropy/astropy",
"issue": "ModelBoundingBox fails when input_shape is passed as a tuple",
"patch": "diff --git a/astropy/modeling/bounding_box.py...",
"test_patch": "def test_bounding_box_tuple_input_shape..."
}常见问题
SWE-bench 可以商用吗?
可以——SWE-bench 采用 MIT 宽松许可证,允许商业使用,包括训练用于产品的模型。发布前请查看数据集卡片中的署名要求。
SWE-bench 有多少数据?需要全部使用吗?
SWE-bench 包含 2,294 Tasks。它是评估基准,用于完整地衡量模型——切勿混入训练数据,否则基准分数将失去意义。
SWE-bench 最适合做什么?
Benchmarking real-world software engineering - never train on it。它属于数据集中心的「评估与基准测试」板块,那里有替代和互补的数据集。