five

NextWealth/Python-DPO-Large

收藏
Hugging Face2024-07-02 更新2024-07-06 收录
下载链接:
https://hf-mirror.com/datasets/NextWealth/Python-DPO-Large
下载链接
链接失效反馈
官方服务:
资源简介:
Python-DPO数据集是一个包含Python代码解决方案的数据集,旨在通过人类反馈和先进的代码生成模型来提高代码的可读性和可维护性。每个数据实例包含一个指令、一个被选中的最优代码解决方案、两个次优的被拒绝代码解决方案以及对这些解决方案的偏好排名。数据集的创建过程涉及严格的评估标准,包括代码的简洁性、边缘案例的处理、错误处理和命名规范等。数据集来源于MBPP数据集的编程问题描述,并使用Codegemma-7b-it和Magicoder-S-DS-6.7B等模型生成Python代码解决方案。

The Python-DPO dataset is a collection of Python code solutions aimed at improving code readability and maintainability through human feedback and advanced code generation models. Each data instance includes an instruction, a chosen optimal Python code solution, two suboptimal rejected solutions, and preference rankings for these solutions. The dataset creation process involves rigorous evaluation criteria, including code conciseness, edge case handling, error handling, and naming conventions. The dataset is sourced from programming problem descriptions in the MBPP dataset and uses models like Codegemma-7b-it and Magicoder-S-DS-6.7B to generate Python code solutions.
提供机构:
NextWealth
原始信息汇总

数据集卡片:Python-DPO

数据集描述

  • 数据集名称: Python-DPO
  • 数据集版本: 较大版本
  • 创建工具: Argilla

数据字段

每个数据实例包含以下字段:

  • instruction: 问题描述/需求
  • chosen_code: 选定的最优Python代码解决方案
  • rejected_code-1: 一个次优的被拒绝解决方案
  • rejected_code-2: 另一个次优的被拒绝解决方案
  • preference: 对指令的排名/偏好

数据实例

数据实例示例如下:

json { "chosen_code": "def max_nth_column(tuple_list, n): """ Finds the maximum of nth column from the given tuple list.

Args: tuple_list: A list of tuples. n: The column number.

Returns: The maximum value in nth column. """

Check if the column number is valid.

if n u003c 0 or n u003e= len(tuple_list[0]): raise ValueError("Invalid column number.")

Find the maximum value in nth column.

max_value = float(u0027-infu0027) for tup in tuple_list: if tup[n] u003e max_value: max_value = tup[n]

return max_value tuple_list = [(1, 2, 3), (4, 5, 6), (7, 8, 9)] N = 1

print(max_nth_column(tuple_list, N))", "instruction": "Write a function to find the maximum of nth column from the given tuple list.", "preference": [ { "status": "submitted", "user_id": "71125d9d-c9ab-43c2-ac20-6ad565134ec3", "value": { "rank": [ 1, 2, 3 ], "value": [ "chosen_code", "rejected_1", "rejected_2" ] } } ], "rejected_code-1": "def max_column(tuples, col): return max(x[col] for x in tuples)

Testing with some example data

data = [(1, 2, 3), (4, 5, 6), (7, 8, 9)] print(max_column(data, 0)) # Outputs: 5 print(max_column(data, 1)) # Outputs: 6", "rejected_code-2": "def max_of_nth(test_list, N): res = max([sub[N] for sub in test_list]) return (res)

test_list = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] N = 1 print(max_of_nth(test_list, N))" }

数据集创建

数据集来源

  • 问题描述来源: MBPP数据集
  • 代码解决方案生成模型: Codegemma-7b-it 和 Magicoder-S-DS-6.7B

标注过程

标注工具

用于评估代码质量的工具包括:

  • pylama: 集成多种代码检查工具,如Isort, Pydocstyle, Pylint, Mypy, Pycodestyle, McCabe, 和 eradicate。
  • pytest: 用于单元测试的框架。
  • bandit: 专注于代码安全性的工具。
  • Profiling tools: 如Cprofiler,用于性能分析。
5,000+
优质数据集
54 个
任务类型
进入经典数据集
二维码
社区交流群

面向社区/商业的数据集话题

二维码
科研交流群

面向高校/科研机构的开源数据集话题

数据驱动未来

携手共赢发展

商业合作