Datasets:

Languages:
code
Multilinguality:
multilingual
Size Categories:
unknown
Language Creators:
crowdsourced
Annotations Creators:
no-annotation
Source Datasets:
original
ArXiv:
License:
ncoop57 commited on
Commit
966104a
1 Parent(s): ff0b80a

Add readme

Browse files
Files changed (1) hide show
  1. README.md +183 -0
README.md ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ YAML tags:
3
+ annotations_creators:
4
+ - no-annotation
5
+ language_creators:
6
+ - crowdsourced
7
+ languages:
8
+ - code
9
+ licenses:
10
+ - gpl-3.0
11
+ multilinguality:
12
+ - multilingual
13
+ pretty_name: Code Clippy
14
+ size_categories:
15
+ - unknown
16
+ source_datasets:
17
+ - original
18
+ task_categories:
19
+ - sequence-modeling
20
+ task_ids:
21
+ - language-modeling
22
+ ---
23
+
24
+ # Dataset Card for Code Clippy Data
25
+
26
+ ## Table of Contents
27
+ - [Table of Contents](#table-of-contents)
28
+ - [Dataset Description](#dataset-description)
29
+ - [Dataset Summary](#dataset-summary)
30
+ - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
31
+ - [Languages](#languages)
32
+ - [Dataset Structure](#dataset-structure)
33
+ - [Data Instances](#data-instances)
34
+ - [Data Fields](#data-fields)
35
+ - [Data Splits](#data-splits)
36
+ - [Dataset Creation](#dataset-creation)
37
+ - [Curation Rationale](#curation-rationale)
38
+ - [Source Data](#source-data)
39
+ - [Annotations](#annotations)
40
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
41
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
42
+ - [Social Impact of Dataset](#social-impact-of-dataset)
43
+ - [Discussion of Biases](#discussion-of-biases)
44
+ - [Other Known Limitations](#other-known-limitations)
45
+ - [Additional Information](#additional-information)
46
+ - [Dataset Curators](#dataset-curators)
47
+ - [Licensing Information](#licensing-information)
48
+ - [Citation Information](#citation-information)
49
+ - [Contributions](#contributions)
50
+
51
+ ## Dataset Description
52
+
53
+ - **Homepage:** https://the-eye.eu/public/AI/training_data/code_clippy_data/
54
+ - **Repository:** https://github.com/ncoop57/gpt-code-clippy
55
+ - **Paper:** [Not yet :)]
56
+ - **Leaderboard:** [Not yet :)]
57
+ - **Point of Contact:** [Nathan Cooper](mailto@nacooper01@email.wm.edu)
58
+
59
+ ### Dataset Summary
60
+
61
+ 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](https://github.com/EleutherAI/github-downloader) (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.
62
+
63
+
64
+ ### Supported Tasks and Leaderboards
65
+
66
+ - `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.
67
+
68
+ ### Languages
69
+
70
+ Multiple programming languages are included in the dataset.
71
+
72
+ ## Dataset Structure
73
+
74
+ ### Data Instances
75
+
76
+ ```
77
+ {
78
+ "id": datasets.Value("int64"),
79
+ "text": datasets.Value("string"),
80
+ "repo_name": datasets.Value("string"),
81
+ "stars": datasets.Value("string"),
82
+ "repo_language": datasets.Value("string"),
83
+ "file_name": datasets.Value("string"),
84
+ "mime_type": datasets.Value("string")
85
+ }
86
+ ```
87
+
88
+ ### Data Fields
89
+
90
+ - `id`: A unique identifier for the data instance.
91
+ - `text`: The text of the code.
92
+ - `repo_name`: The name of the repository.
93
+ - `stars`: The number of stars the repository has.
94
+ - `repo_language`: The programming language of the repository.
95
+ - `file_name`: The name of the file.
96
+ - `mime_type`: The MIME type of the file.
97
+
98
+ ### Data Splits
99
+
100
+ | Size in GBs | Tain | Valid | Test |
101
+ | ----- | ------ | ----- | ---- |
102
+ | Duplicate | 194 | 9 | 6.3 |
103
+ | Deduplicate | 126 | 3.3 | 3.1 |
104
+
105
+ ## Dataset Creation
106
+
107
+ ### Curation Rationale
108
+
109
+ To have a code dataset that is large enough to properly train a large language model on.
110
+
111
+ ### Source Data
112
+
113
+ #### Initial Data Collection and Normalization
114
+
115
+ - [The Pile](https://github.com/EleutherAI/github-downloader)
116
+ - [Seart-GHS](https://seart-ghs.si.usi.ch/)
117
+
118
+ 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](https://pypi.org/project/lm-dataformat/) format.
119
+
120
+ #### Who are the source language producers?
121
+
122
+ Software developers.
123
+
124
+ ### Annotations
125
+
126
+ #### Annotation process
127
+
128
+ No annotation was performed.
129
+
130
+ #### Who are the annotators?
131
+
132
+ N/A
133
+
134
+ ### Personal and Sensitive Information
135
+
136
+ 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.
137
+
138
+ ## Considerations for Using the Data
139
+
140
+ ### Social Impact of Dataset
141
+
142
+ The paper ["Evaluating Large Language Models Trained on Code"](https://arxiv.org/abs/2107.03374) 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**.
143
+
144
+ 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.
145
+ 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](https://www.onetonline.org/link/summary/15-1252.00), developers don't just write software.
146
+ 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.
147
+ 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.
148
+
149
+ ### Discussion of Biases
150
+
151
+ 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.
152
+
153
+ ### Other Known Limitations
154
+
155
+ [More Information Needed]
156
+
157
+ ## Additional Information
158
+
159
+ ### Dataset Curators
160
+
161
+ Nathan Coooper, Artashes Arutiunian, Santiago Hincapié-Potes, Ben Trevett, Arun Raja, Erfan Hossami, Mrinal Mathur, and contributors!
162
+
163
+ ### Licensing Information
164
+
165
+ This repository is under the GPL-3.0 license.
166
+
167
+ ### Citation Information
168
+
169
+ ```
170
+ @misc{cooper-2021-code-clippy-data,
171
+ author = {Nathan Coooper, Artashes Arutiunian, Santiago Hincapié-Potes, Ben Trevett, Arun Raja, Erfan Hossami, Mrinal Mathur, and contributors},
172
+ title = {{Code Clippy Data: A large dataset of code data from Github for research into code language models}},
173
+ month = jul,
174
+ year = 2021,
175
+ version = {1.0},
176
+ publisher = {GitHub},
177
+ url = {https://github.com/ncoop57/gpt-code-clippy}
178
+ }
179
+ ```
180
+
181
+ ### Contributions
182
+
183
+ Thanks to [@ncoop57](https://github.com/ncoop57), [@arampacha](https://github.com/arampacha), [@shpotes](https://github.com/shpotes), [@bentrevett](https://github.com/bentrevett), [@arunraja-hub](https://github.com/arunraja-hub), [@taisazero](https://github.com/taisazero), [@Mrinal18](https://github.com/Mrinal18), and contributors for adding this dataset.