leo-liuzy/CodeUpdateArena
收藏数据集概述
数据集描述
数据集摘要
CodeUpdateArena数据集是一个用于代码领域知识编辑的基准。每个实例包含一个合成API函数更新及其对应的程序合成示例。
支持的任务和排行榜
- 任务类别: 文本到文本生成
- 语言: 英语
语言
编程问题使用Python编写,包含英文注释和文档字符串。
数据集结构
数据实例
一个数据实例示例: json { "update": { "description": "Renaming select_dtypes to ...", "rationale": "The new function name filter_by_dtypes better communicates the purpose...", "docstring": "The functionality remains the same as the original select_dtypes function....", "signature": "pandas.DataFrame.filter_by_dtypes(self, include=None, exclude=None) -> Self", "imports": "import numpy import pandas ... old_select_dtypes = pandas.DataFrame.select_dtypes setattr(pandas.DataFrame, old_select_dtypes, old_select_dtypes)", "implementation": "def filter_by_dtypes(self, include=None, exclude=None): ...", "unit_tests": "def test_filter_type_int64(): ....", "update_type": "modify-function-name", "api_path": "pandas.DataFrame.select_dtypes", "package": "pandas", "update_id": "[pandas.DataFrame.select_dtypes]:[modify-function-name]:[update-0]" }, "update_id": "[pandas.DataFrame.select_dtypes]:[modify-function-name]:[update-0]", "scenario": "You are a data scientist at a tech company.....", "problem": "Write a Python function that given a pandas DataFrame, a....", "solution_signature": "def filter_dataframe_by_dtype(dataframe, include, exclude, n_cols)", "unit_tests": "def test_filter_dataframe_by_dtype_no_exclude(): # Creating a DataFrame for testing ...", "imports": "import numpy import pandas ...", "prog_syn_id": "[pandas.DataFrame.select_dtypes]:[modify-function-name]:[update-0]:[prog_syn-3]" }
数据字段
update(字典): 特定代码API更新的内容description: 更新的描述rationale: 引入更新的理由docstring: 详细说明更新的文档字符串signature: 更新后的函数签名imports: 运行更新所需的导入implementation: 更新函数的实现unit_tests: 验证更新函数正确性的单元测试update_type: 更新所属的类型api_path: 函数的完整API路径package: 函数所属的Python包update_id: 特定更新的唯一标识符
update_id: 特定更新的唯一标识符,与update字典中的update_id相同scenario: 程序合成示例所处的场景problem: 程序合成示例试图解决的问题solution_signature: 问题陈述所需的解决方案签名unit_tests: 验证预测解决方案正确性的单元测试imports: 运行程序合成参考解决方案所需的导入ref_solution: 程序合成示例的参考解决方案prog_syn_id: 程序合成示例的唯一标识符
数据分割
数据集包含670个样本。
数据集创建
策划理由
当前的代码生成模型基于过去的代码语料库进行训练,但代码API不断演变,遵循旧的API可能导致失败。为了最大限度地有用,代码生成模型需要与API更新保持同步,即使这些更新发生在预训练之后。然而,当前社区缺少测试API更新的基准。为了协助这一方向的研究,我们提出了CodeUpdateArena基准。
源数据
数据集由作者提出的新生成管道(由GPT-4-0613驱动)合成生成。
个人和敏感信息
无。
使用数据的注意事项
在评估此数据集时,确保在安全环境中执行生成的Python代码,因为生成的代码可能有害。
数据集的社会影响
通过此数据集,可以更好地评估代码生成模型在问题解决中整合新代码API更新的能力。
附加信息
数据集策展人
Zeyu Leo Liu, Shrey Pandit, Xi Ye, Eunsol Choi, Greg Durrett
许可信息
MIT许可证



