princeton-nlp/SWE-bench_oracle_llama
收藏Hugging Face2024-04-15 更新2024-03-04 收录
下载链接:
https://hf-mirror.com/datasets/princeton-nlp/SWE-bench_oracle_llama
下载链接
链接失效反馈官方服务:
资源简介:
---
dataset_info:
features:
- name: base_commit
dtype: string
- name: hints_text
dtype: string
- name: created_at
dtype: string
- name: test_patch
dtype: string
- name: repo
dtype: string
- name: problem_statement
dtype: string
- name: version
dtype: string
- name: instance_id
dtype: string
- name: FAIL_TO_PASS
dtype: string
- name: PASS_TO_PASS
dtype: string
- name: environment_setup_commit
dtype: string
- name: text
dtype: string
- name: input_ids
sequence: int32
- name: labels
sequence: int64
- name: patch
dtype: string
splits:
- name: test
num_bytes: 552504241
num_examples: 2294
download_size: 199998643
dataset_size: 552504241
configs:
- config_name: default
data_files:
- split: test
path: data/test-*
---
### Dataset Summary
SWE-bench is a dataset that tests systems’ ability to solve GitHub issues automatically. The dataset collects 2,294 Issue-Pull Request pairs from 12 popular Python. Evaluation is performed by unit test verification using post-PR behavior as the reference solution.
### Supported Tasks and Leaderboards
SWE-bench proposes a new task: issue resolution provided a full repository and GitHub issue. The leaderboard can be found at www.swebench.com
### Languages
The text of the dataset is primarily English, but we make no effort to filter or otherwise clean based on language type.
## Dataset Structure
### Data Instances
An example of a SWE-bench datum is as follows:
```
instance_id: (str) - A formatted instance identifier, usually as repo_owner__repo_name-PR-number.
patch: (str) - The gold patch, the patch generated by the PR (minus test-related code), that resolved the issue.
repo: (str) - The repository owner/name identifier from GitHub.
base_commit: (str) - The commit hash of the repository representing the HEAD of the repository before the solution PR is applied.
hints_text: (str) - Comments made on the issue prior to the creation of the solution PR’s first commit creation date.
created_at: (str) - The creation date of the pull request.
test_patch: (str) - A test-file patch that was contributed by the solution PR.
problem_statement: (str) - The issue title and body.
version: (str) - Installation version to use for running evaluation.
environment_setup_commit: (str) - commit hash to use for environment setup and installation.
FAIL_TO_PASS: (str) - A json list of strings that represent the set of tests resolved by the PR and tied to the issue resolution.
PASS_TO_PASS: (str) - A json list of strings that represent tests that should pass before and after the PR application.
text: (str) - The generated text according to the retrieval criterion and the style-2 prompt found in [github:SWE-bench](https://github.com/princeton-nlp/SWE-bench).
input_ids: (List[int]) - The llama tokens for each text.
```
[More Information needed](https://github.com/huggingface/datasets/blob/main/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
dataset_info:
features:
- name: base_commit
dtype: string
- name: hints_text
dtype: string
- name: created_at
dtype: string
- name: test_patch
dtype: string
- name: repo
dtype: string
- name: problem_statement
dtype: string
- name: version
dtype: string
- name: instance_id
dtype: string
- name: FAIL_TO_PASS
dtype: string
- name: PASS_TO_PASS
dtype: string
- name: environment_setup_commit
dtype: string
- name: text
dtype: string
- name: input_ids
sequence: int32
- name: labels
sequence: int64
- name: patch
dtype: string
splits:
- name: test
num_bytes: 552504241
num_examples: 2294
download_size: 199998643
dataset_size: 552504241
configs:
- config_name: default
data_files:
- split: test
path: data/test-*
---
### 数据集概述
SWE-bench是一款用于评估系统自动解决GitHub议题能力的数据集。该数据集从12个热门Python项目中收集了2294条议题-拉取请求(Pull Request,简称PR)对。评估环节采用单元测试验证方式,以拉取请求合并后的代码行为作为参考解决方案。
### 支持任务与排行榜
SWE-bench提出了一项全新任务:在提供完整代码仓库与GitHub议题的前提下完成议题修复。其官方排行榜可通过www.swebench.com访问。
### 语言说明
该数据集的文本以英文为主,且未针对语言类型进行任何过滤或清洗操作。
## 数据集结构
### 数据样本
SWE-bench的单条数据样本示例如下:
instance_id: (str) - 格式化的样本标识符,通常格式为 repo_owner__repo_name-PR-编号。
patch: (str) - 黄金补丁(gold patch),即由拉取请求生成的、用于修复该议题的代码补丁(已剔除与测试相关的代码)。
repo: (str) - 来自GitHub的代码仓库所有者/名称标识符。
base_commit: (str) - 该仓库的提交哈希值,代表解决方案拉取请求应用前的仓库HEAD版本。
hints_text: (str) - 在解决方案拉取请求的首次提交创建日期之前,针对该议题发布的评论内容。
created_at: (str) - 拉取请求的创建日期。
test_patch: (str) - 由解决方案拉取请求贡献的测试文件补丁。
problem_statement: (str) - 议题的标题与正文内容。
version: (str) - 运行评估时所需使用的安装版本。
environment_setup_commit: (str) - 用于环境搭建与安装的提交哈希值。
FAIL_TO_PASS: (str) - JSON格式的字符串列表,代表该拉取请求所修复的、与议题修复相关的测试集合。
PASS_TO_PASS: (str) - JSON格式的字符串列表,代表在拉取请求应用前后均应通过测试的集合。
text: (str) - 依据检索准则与[github:SWE-bench](https://github.com/princeton-nlp/SWE-bench)中所述的风格2提示生成的文本。
input_ids: (List[int]) - 对应每条文本的Llama模型Token序列。
labels: (sequence: int64) - 对应每条文本的int64类型标签序列。
[更多信息待补充](https://github.com/huggingface/datasets/blob/main/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
提供机构:
princeton-nlp原始信息汇总
数据集概述
SWE-bench 是一个测试系统自动解决 GitHub 问题的能力的数据集。该数据集收集了来自 12 个流行 Python 项目的 2,294 个 Issue-Pull Request 对。评估通过使用 PR 后的行为作为参考解决方案的单元测试验证进行。
支持的任务和排行榜
SWE-bench 提出了一项新任务:在提供完整仓库和 GitHub Issue 的情况下进行问题解决。排行榜可以在 www.swebench.com 找到。
语言
数据集的文本主要是英语,但没有根据语言类型进行过滤或清理。
数据集结构
数据实例
SWE-bench 数据实例的示例如下:
instance_id(str) - 格式化的实例标识符,通常为 repo_owner__repo_name-PR-number。patch(str) - 黄金补丁,由 PR 生成的解决问题的补丁(减去与测试相关的代码)。repo(str) - GitHub 上的仓库所有者/名称标识符。base_commit(str) - 表示解决方案 PR 应用之前仓库 HEAD 的提交哈希。hints_text(str) - 在解决方案 PR 的第一次提交创建日期之前在 Issue 上发表的评论。created_at(str) - 拉取请求的创建日期。test_patch(str) - 解决方案 PR 贡献的测试文件补丁。problem_statement(str) - Issue 的标题和正文。version(str) - 用于运行评估的安装版本。environment_setup_commit(str) - 用于环境和安装设置的提交哈希。FAIL_TO_PASS(str) - 表示由 PR 解决并与问题解决相关联的测试集的 JSON 字符串列表。PASS_TO_PASS(str) - 表示在 PR 应用前后应通过的测试的 JSON 字符串列表。text(str) - 根据检索标准和 github:SWE-bench 中找到的 style-2 提示生成的文本。input_ids(List[int]) - 每个文本的 llama 令牌。
数据分割
test分割包含 2294 个样本,总字节数为 552504241。
数据集大小
- 下载大小:199998643 字节
- 数据集大小:552504241 字节
搜集汇总
数据集介绍

构建方式
在软件工程领域,自动化解决GitHub问题已成为提升开发效率的关键研究方向。SWE-bench数据集的构建基于对12个流行Python仓库的深度挖掘,精心收集了2,294个Issue-Pull Request配对,每个实例均以问题解决前后的代码提交为基础,通过提取问题描述、补丁文件、测试用例及环境配置等关键元素,形成结构化数据。构建过程严格遵循实际开发流程,确保数据真实反映开源社区中的问题解决场景,为模型训练与评估提供了坚实的现实基础。
使用方法
使用该数据集时,研究者可将其应用于自动化问题解决任务的模型训练与评估。典型流程包括:加载数据集后,模型需基于给定的仓库代码、问题描述及相关提示,生成能够通过单元测试的代码补丁。评估阶段通过比对模型输出与数据集中提供的标准补丁,结合测试用例的执行结果,量化模型的解决准确率。数据集支持端到端的实验设计,便于在仿真环境中验证模型在真实软件开发场景中的实际效能。
背景与挑战
背景概述
在软件工程领域,自动化代码修复与问题解决一直是推动开发效率提升的关键研究方向。由普林斯顿大学自然语言处理团队于2023年创建的SWE-bench数据集,聚焦于评估智能系统自动解决GitHub问题的能力。该数据集精心收集了来自12个流行Python项目的2294个Issue-Pull Request配对,通过单元测试验证机制,以拉取请求后的代码行为作为标准解决方案。其核心研究在于探索大型语言模型在复杂软件维护任务中的实际应用潜力,为自动化软件工程研究提供了标准化评估基准,显著推动了智能编程助手与代码生成系统的发展。
当前挑战
该数据集致力于解决软件工程中自动化问题修复的复杂挑战,要求系统在完整代码库上下文中理解自然语言描述的问题并生成正确代码补丁。构建过程中的主要困难在于确保数据的高质量与可复现性:需要精确提取Issue-Pull Request的对应关系,过滤测试代码以保留核心修复逻辑,并构建稳定的跨版本单元测试验证环境。同时,数据集的规模与多样性平衡、长上下文代码理解以及多步骤推理任务的评估设计,均为持续的研究难点。
常用场景
经典使用场景
在软件工程与人工智能交叉领域,SWE-bench数据集为评估自动化代码修复系统提供了基准测试框架。该数据集通过收集GitHub上的真实Issue-Pull Request对,模拟了开发过程中从问题报告到代码修复的完整流程。研究者利用其构建的单元测试验证环境,能够系统性地衡量模型在理解问题描述、定位代码缺陷及生成正确补丁方面的综合能力,尤其适用于测试大型语言模型在复杂软件维护任务中的实际表现。
解决学术问题
该数据集有效解决了自动化软件工程中长期存在的评估标准化难题。传统研究往往依赖合成或小规模代码缺陷,难以反映真实开发场景的复杂性。SWE-bench通过大规模真实世界问题集合,为衡量模型在跨项目、多模态信息处理(如自然语言描述与代码变更关联)方面的能力提供了可靠基准。其引入的单元测试验证机制,将主观的代码质量评估转化为客观的测试通过率指标,显著提升了研究成果的可复现性与可比性。
实际应用
在实际工业场景中,该数据集为构建智能编程助手与自动化代码审查工具提供了关键训练与验证资源。开发团队可基于其构建的评估框架,测试现有代码生成模型在真实项目维护任务中的适用性,例如自动修复安全漏洞、优化性能缺陷或适配API变更。教育机构亦能借助其丰富的案例资源,设计软件维护课程实验,帮助学生理解从问题诊断到解决方案实施的完整工程链条。
数据集最近研究
最新研究方向
在软件工程智能化领域,SWE-bench数据集作为评估自动解决GitHub问题能力的基准,正推动着代码生成与修复技术的前沿探索。当前研究聚焦于利用大型语言模型理解复杂代码库上下文,通过整合问题描述、历史讨论及测试用例,实现精准的代码补丁生成。热点方向包括多模态信息融合与强化学习策略优化,旨在提升模型在真实开发环境中的泛化能力与实用性。这些进展不仅加速了自动化编程工具的发展,也为软件维护智能化提供了关键的理论与实践支撑,深刻影响着软件开发范式的演进。
以上内容由遇见数据集搜集并总结生成



