Datasets:

Languages:
code
ArXiv:
License:
code_clippy / README.md
albertvillanova's picture
Fix task tags
c69319d
|
raw
history blame
9.64 kB
metadata
annotations_creators:
  - no-annotation
language_creators:
  - crowdsourced
language:
  - code
license:
  - gpl-3.0
multilinguality:
  - multilingual
size_categories:
  - unknown
source_datasets:
  - original
task_categories:
  - text-generation
task_ids:
  - language-modeling
pretty_name: Code Clippy

Dataset Card for Code Clippy Data

Table of Contents

Dataset Description

Dataset Summary

This dataset was generated by selecting GitHub repositories from a large collection of repositories. These repositories were collected from https://seart-ghs.si.usi.ch/ and Github portion of The Pile (performed on July 7th, 2021). The goal of this dataset is to provide a training set for pretraining large language models on code data for helping software engineering researchers better understand their impacts on software related tasks such as autocompletion of code. The dataset is split into train, validation, and test splits. There is a version containing duplicates (209GBs compressed) and ones where exact duplicates (132GBs compressed) are removed. Contains mostly JavaScript and Python code, but other programming languages are included as well to various degrees.

Supported Tasks and Leaderboards

  • language-modeling: The dataset can be used to train a model for language modeling for modeling programming languages, which consists of pretraining/finetuning a model to predict missing tokens, either causally or masked, given some context. Success on this task is typically measured by achieving a low perplexity score.

Languages

Multiple programming languages are included in the dataset.

Dataset Structure

Data Instances

{
  "id": datasets.Value("int64"),
  "text": datasets.Value("string"),
  "repo_name": datasets.Value("string"),
  "stars": datasets.Value("string"),
  "repo_language": datasets.Value("string"),
  "file_name": datasets.Value("string"),
  "mime_type": datasets.Value("string")
}

Data Fields

  • id: A unique identifier for the data instance.
  • text: The text of the code.
  • repo_name: The name of the repository.
  • stars: The number of stars the repository has.
  • repo_language: The programming language of the repository.
  • file_name: The name of the file.
  • mime_type: The MIME type of the file.

Data Splits

Size in GBs Tain Valid Test
Duplicate 194 9 6.3
Deduplicate 126 3.3 3.1

Dataset Creation

Curation Rationale

To have a code dataset that is large enough to properly train a large language model on.

Source Data

Initial Data Collection and Normalization

Repositories were collected from both sources and the helper script from https://github.com/EleutherAI/github-downloader was used to download the repositories. Files were scrapped from the downloaded repositories, but ignored files that had certain extensions associated with binary or other non-textual/autogenerated content, and the output was converted into the LM_Dataformat format.

Who are the source language producers?

Software developers.

Annotations

Annotation process

No annotation was performed.

Who are the annotators?

N/A

Personal and Sensitive Information

Since this data was collected from public repositories, there exists potential for personal and sensitive information to be included in the data through developers accidentally or on purpose uploading their secret keys, passwords, API keys, emails, etc.

Considerations for Using the Data

Social Impact of Dataset

The paper "Evaluating Large Language Models Trained on Code" from OpenAI has a good discussion on what the impact of a large language model trained on code could be. Therefore, some parts of their discuss are highlighted here as it pertains to this dataset and models that may be trained from it. As well as some differences in views from the paper, particularly around legal implications.

  1. Over-reliance: A language model trained on large datasets such as this one for the task of autogenerating code may generate plausible solutions that may appear correct, but are not necessarily the correct solution. Not properly evaluating the generated code may cause have negative consequences such as the introduction of bugs, or the introduction of security vulnerabilities. Therefore, it is important that users are aware of the limitations and potential negative consequences of using a language model trained on this dataset.
  2. Economic and labor market impacts: Large language models trained on large code datasets such as this one that are capable of generating high-quality code have the potential to automate part of the software development process. This may negatively impact software developers. However, as discussed in the paper, as shown in the Summary Report of software developers from O*NET OnLine, developers don't just write software.
  3. Security implications: No filtering or checking of vulnerabilities or buggy code was performed. This means that the dataset may contain code that may be malicious or contain vulnerabilities. Therefore, any model trained on this dataset may generate vulnerable, buggy, or malicious code. In safety critical software, this could lead to software that may work improperly and could result in serious consequences depending on the software. Additionally, a model trained on this dataset may be used to generate malicious code on purpose in order to perform ransomware or other such attacks.
  4. Legal implications: No filtering was performed on licensed code. This means that the dataset may contain restrictive licensed code. As discussed in the paper, public Github repositories may fall under "fair use." However, there has been little to no previous cases of such usages of licensed publicly available code. Therefore, any model trained on this dataset may be required to obey license terms that align with the software it was trained on such as GPL-3.0, which is why we purposefully put this dataset under the GPL-3.0 license. It is unclear the legal ramifications of using a language model trained on this dataset.

Discussion of Biases

The programming languages most represented in this dataset are those of Javascript and Python. Therefore, other, still popular languages such as C and C++, are less represented and therefore model performance for these languages will be less comparatively. Additionally, this dataset only contains public repositories and so may not be representative of code written by private developers. No filtering was performed for potential racist, offensive, or otherwise inappropriate content. Therefore there may be such content in the dataset that will be reflected in models trained on it.

Other Known Limitations

[More Information Needed]

Additional Information

Dataset Curators

Nathan Coooper, Artashes Arutiunian, Santiago Hincapié-Potes, Ben Trevett, Arun Raja, Erfan Hossami, Mrinal Mathur, and contributors!

Licensing Information

This repository is under the GPL-3.0 license.

Citation Information

@misc{cooper-2021-code-clippy-data,
    author       = {Nathan Coooper, Artashes Arutiunian, Santiago Hincapié-Potes, Ben Trevett, Arun Raja, Erfan Hossami, Mrinal Mathur, and contributors},
    title        = {{Code Clippy Data: A large dataset of code data from Github for research into code language models}},
    month        = jul,
    year         = 2021,
    version      = {1.0},
    publisher    = {GitHub},
    url          = {https://github.com/ncoop57/gpt-code-clippy}
}

Contributions

Thanks to @ncoop57, @arampacha, @shpotes, @bentrevett, @arunraja-hub, @taisazero, @Mrinal18, and contributors for adding this dataset.