flytech/python-codes-25k

Dataset

182

stars

13

commits

1

linked in READMEs

May 15, 2024

updated

behavioral
cleaned
code
code2text
codegeneration
dataset 25k
flytech
instructional
programming
python
text2code
trending
Browse cluster: Code Generation and Learning Datasets

README

License

MIT


This is a Cleaned Python Dataset Covering 25,000 Instructional Tasks

Overview

The dataset has 4 key features (fields): instruction, input, output, and text.
It's a rich source for Python codes, tasks, and extends into behavioral aspects.


Dataset Statistics

  • Total Entries: 24,813
  • Unique Instructions: 24,580
  • Unique Inputs: 3,666
  • Unique Outputs: 24,581
  • Unique Texts: 24,813
  • Average Tokens per example: 508

Features

  • instruction: The instructional task to be performed / User input
  • input: Very short, introductive part of AI response or empty
  • output: Python code that accomplishes the task
  • text: All fields combined together

Usage

This dataset can be useful for:

  • Code generation tasks
  • Natural Language Understanding models specialized in coding languages
  • Behavioral analysis based on the given tasks and codes
  • Educational purposes to understand coding styles and task variations

To load the dataset, one can use the following snippet:

# Double-check if there is ~25k examples instead of almost 50k (HF thinks jsonl and json are two different datasets)

from datasets import load_dataset

dataset = load_dataset('flytech/python-codes-25k', split='train')

# One can map the dataset in any way, for the sake of example:
dataset = dataset.map(lambda example: {'text': example['instruction'] + ' ' + example['input'] + ' ' + example['output']})['text']
# Remember that you don't need to map if the dataset has a "text" field already:)

Access & Contributions

Feel free to use this dataset as per the MIT license. Contributions to enhance or expand the dataset are welcome. The dataset can also be found on kaggle, under the same name but from different author.

Contributors

flytech

13 commits

flytech/python-codes-25k

Dataset

182

stars

13

commits

1

linked in READMEs

May 15, 2024

updated

behavioral
cleaned
code
code2text
codegeneration
dataset 25k
flytech
instructional
programming
python
text2code
trending
Browse cluster: Code Generation and Learning Datasets

README

License

MIT


This is a Cleaned Python Dataset Covering 25,000 Instructional Tasks

Overview

The dataset has 4 key features (fields): instruction, input, output, and text.
It's a rich source for Python codes, tasks, and extends into behavioral aspects.


Dataset Statistics

  • Total Entries: 24,813
  • Unique Instructions: 24,580
  • Unique Inputs: 3,666
  • Unique Outputs: 24,581
  • Unique Texts: 24,813
  • Average Tokens per example: 508

Features

  • instruction: The instructional task to be performed / User input
  • input: Very short, introductive part of AI response or empty
  • output: Python code that accomplishes the task
  • text: All fields combined together

Usage

This dataset can be useful for:

  • Code generation tasks
  • Natural Language Understanding models specialized in coding languages
  • Behavioral analysis based on the given tasks and codes
  • Educational purposes to understand coding styles and task variations

To load the dataset, one can use the following snippet:

# Double-check if there is ~25k examples instead of almost 50k (HF thinks jsonl and json are two different datasets)

from datasets import load_dataset

dataset = load_dataset('flytech/python-codes-25k', split='train')

# One can map the dataset in any way, for the sake of example:
dataset = dataset.map(lambda example: {'text': example['instruction'] + ' ' + example['input'] + ' ' + example['output']})['text']
# Remember that you don't need to map if the dataset has a "text" field already:)

Access & Contributions

Feel free to use this dataset as per the MIT license. Contributions to enhance or expand the dataset are welcome. The dataset can also be found on kaggle, under the same name but from different author.

Contributors

flytech

13 commits