CodeEff/ECCO
收藏资源简介:
--- dataset_info: - config_name: edit features: - name: input dtype: string - name: target dtype: string - name: problem_id dtype: string splits: - name: train num_bytes: 56166875 num_examples: 48386 - name: val num_bytes: 3336062 num_examples: 3338 - name: test num_bytes: 857857 num_examples: 794 download_size: 365069 dataset_size: 60360794 - config_name: generate features: - name: problem_id dtype: string - name: problem_description dtype: string splits: - name: train num_bytes: 1793963 num_examples: 1262 - name: val num_bytes: 96855 num_examples: 69 - name: test num_bytes: 60776 num_examples: 49 download_size: 37588 dataset_size: 1951594 - config_name: generate_eval features: - name: problem_id dtype: string - name: runtimes sequence: float64 - name: memories sequence: float64 - name: num_sol dtype: int64 splits: - name: test num_bytes: 770704 num_examples: 48 download_size: 147211 dataset_size: 770704 configs: - config_name: edit data_files: - split: train path: edit/train-* - split: val path: edit/val-* - split: test path: edit/test-* - config_name: generate data_files: - split: train path: generate/train-* - split: val path: generate/val-* - split: test path: generate/test-* - config_name: generate_eval data_files: - split: test path: generate_eval/test-* --- # ECCO Dataset from the paper "ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?"  The dataset consists of 2 subsets `edit` and `generate` each with 3 splits (`train`, `val` and `test`). Code repository: [https://github.com/CodeEff/ECCO](https://github.com/CodeEff/ECCO) ### Loading the dataset / benchmark ```python dataset = load_dataset('CodeEff/ECCO', 'edit') # For history-based editing setting dataset = load_dataset('CodeEff/ECCO', 'generate') # For nl-instructed generation setting ``` These are used to generate code by each model across the 2 paradigms. We use the `test` split for the evaluation/results and the `train` and `val` splits for finetuning and few-shot prompting. ### Download the test cases ```sh mkdir data && cd data wget https://huggingface.co/datasets/CodeEff/ECCO/resolve/main/test_cases.zip unzip test_cases.zip ``` ### Evaluation dataset The dataset also consists of an additional 3rd subset `generate_eval` which consists of the runtime and memory of a spectrum of user solutions for each problem in the `test` split. This is used for the percentile evaluation of the **NL-instructed generation** paradigm. ### Data Sources Dataset is sourced from [IBM CodeNet](https://github.com/IBM/Project_CodeNet) which consists of primarily competetive programming solutions. This is further filtered for efficiency and correctness as described in our paper. ### Citation ```bib @article{waghjale2024ecco, title={ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?}, author={Waghjale, Siddhant and Veerendranath, Vishruth and Wang, Zora Zhiruo and Fried, Daniel}, journal={arXiv preprint arXiv:2407.14044}, year={2024} } ```
数据集信息: - 配置名称:edit(编辑) 特征: - 名称:input(输入),数据类型:string(字符串) - 名称:target(目标输出),数据类型:string(字符串) - 名称:problem_id(问题ID),数据类型:string(字符串) 拆分: - 拆分名称:train(训练集),字节数:56166875,样本数:48386 - 拆分名称:val(验证集),字节数:3336062,样本数:3338 - 拆分名称:test(测试集),字节数:857857,样本数:794 下载大小:365069,数据集总大小:60360794 - 配置名称:generate(生成) 特征: - 名称:problem_id(问题ID),数据类型:string(字符串) - 名称:problem_description(问题描述),数据类型:string(字符串) 拆分: - 拆分名称:train(训练集),字节数:1793963,样本数:1262 - 拆分名称:val(验证集),字节数:96855,样本数:69 - 拆分名称:test(测试集),字节数:60776,样本数:49 下载大小:37588,数据集总大小:1951594 - 配置名称:generate_eval(生成评估) 特征: - 名称:problem_id(问题ID),数据类型:string(字符串) - 名称:runtimes(运行时),数据类型:float64(64位浮点型)序列 - 名称:memories(内存占用),数据类型:float64(64位浮点型)序列 - 名称:num_sol(解数量),数据类型:int64(64位整型) 拆分: - 拆分名称:test(测试集),字节数:770704,样本数:48 下载大小:147211,数据集总大小:770704 配置列表: - 配置名称:edit(编辑) 数据文件: - 拆分:train(训练集),路径:edit/train-* - 拆分:val(验证集),路径:edit/val-* - 拆分:test(测试集),路径:edit/test-* - 配置名称:generate(生成) 数据文件: - 拆分:train(训练集),路径:generate/train-* - 拆分:val(验证集),路径:generate/val-* - 拆分:test(测试集),路径:generate/test-* - 配置名称:generate_eval(生成评估) 数据文件: - 拆分:test(测试集),路径:generate_eval/test-* # ECCO ## 数据集介绍 本数据集来自论文《ECCO:能否在不牺牲功能正确性的前提下提升模型生成代码的效率?》(ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?)  该数据集包含`edit`(编辑)与`generate`(生成)两个子集,每个子集均设有`train`(训练集)、`val`(验证集)与`test`(测试集)三个拆分。 代码仓库:[https://github.com/CodeEff/ECCO](https://github.com/CodeEff/ECCO) ### 数据集加载与基准测试 python # 基于历史代码编辑场景加载数据集 dataset = load_dataset('CodeEff/ECCO', 'edit') # 基于自然语言指令生成场景加载数据集 dataset = load_dataset('CodeEff/ECCO', 'generate') 上述两种加载方式分别对应两类编程范式下的模型代码生成任务。我们使用`test`(测试集)拆分开展评估与结果统计,`train`(训练集)与`val`(验证集)拆分用于模型微调与少样本(Few-shot)提示。 ### 下载测试用例 sh mkdir data && cd data wget https://huggingface.co/datasets/CodeEff/ECCO/resolve/main/test_cases.zip unzip test_cases.zip ### 评估数据集 该数据集还包含第三个额外子集`generate_eval`(生成评估),其包含`test`(测试集)拆分中每个问题对应的一系列用户解决方案的运行时与内存占用数据。该子集用于**自然语言指令生成(NL-instructed generation)**范式的百分位评估。 ### 数据来源 本数据集源自[IBM CodeNet](https://github.com/IBM/Project_CodeNet),该数据集主要包含竞赛编程解决方案。我们按照论文中所述的标准,进一步对数据进行了效率与正确性筛选。 ### 引用信息 bib @article{waghjale2024ecco, title={ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?}, author={Waghjale, Siddhant and Veerendranath, Vishruth and Wang, Zora Zhiruo and Fried, Daniel}, journal={arXiv preprint arXiv:2407.14044}, year={2024} }




