Datasets:

ArXiv:
License:
NamCyan commited on
Commit
0c72583
1 Parent(s): 54013c1

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +218 -0
README.md ADDED
@@ -0,0 +1,218 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - code
4
+ - en
5
+ multilinguality:
6
+ - multiprogramming languages
7
+ task_categories:
8
+ - text-generation
9
+ dataset_info:
10
+ features:
11
+ - name: identifier
12
+ dtype: string
13
+ - name: return_type
14
+ dtype: string
15
+ - name: repo
16
+ dtype: string
17
+ - name: path
18
+ dtype: string
19
+ - name: language
20
+ dtype: string
21
+ - name: code
22
+ dtype: string
23
+ - name: code_tokens
24
+ dtype: string
25
+ - name: original_docstring
26
+ dtype: string
27
+ - name: comment
28
+ dtype: string
29
+ - name: docstring_tokens
30
+ dtype: string
31
+ - name: docstring
32
+ dtype: string
33
+ - name: original_string
34
+ dtype: string
35
+ splits:
36
+ - name: python
37
+ num_bytes: 30797754227
38
+ num_examples: 9893858
39
+ - name: java
40
+ num_bytes: 23130202517
41
+ num_examples: 7886299
42
+ - name: javascript
43
+ num_bytes: 6833869001
44
+ num_examples: 2562158
45
+ - name: php
46
+ num_bytes: 13072500520
47
+ num_examples: 5455989
48
+ - name: c_sharp
49
+ num_bytes: 11144245789
50
+ num_examples: 4011467
51
+ - name: c
52
+ num_bytes: 6205820571
53
+ num_examples: 1978551
54
+ - name: cpp
55
+ num_bytes: 6228306797
56
+ num_examples: 1934958
57
+ - name: go
58
+ num_bytes: 11339059495
59
+ num_examples: 5649158
60
+ - name: rust
61
+ num_bytes: 2661037428
62
+ num_examples: 1076588
63
+ - name: ruby
64
+ num_bytes: 1224195690
65
+ num_examples: 544867
66
+ download_size: 26404353470
67
+ dataset_size: 112636992035
68
+ pretty_name: The Vault
69
+ viewer: true
70
+ ---
71
+
72
+
73
+
74
+ ## Table of Contents
75
+ - [Dataset Description](#dataset-description)
76
+ - [Dataset Summary](#dataset-summary)
77
+ - [Supported Tasks](#supported-tasks)
78
+ - [Languages](#languages)
79
+ - [Dataset Structure](#dataset-structure)
80
+ - [Data Instances](#data-instances)
81
+ - [Data Fields](#data-fields)
82
+ - [Data Splits](#data-splits)
83
+ - [Dataset Statistics](#dataset-statistics)
84
+ - [Usage](#usage)
85
+ - [Additional Information](#additional-information)
86
+ - [Licensing Information](#licensing-information)
87
+ - [Citation Information](#citation-information)
88
+ - [Contributions](#contributions)
89
+
90
+
91
+ ## Dataset Description
92
+
93
+ - **Repository:** [FSoft-AI4Code/TheVault](https://github.com/FSoft-AI4Code/TheVault)
94
+ - **Paper:** The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generation
95
+ - **Contact:** support.ailab@fpt.com
96
+ - **Website:** https://www.fpt-aicenter.com/ai-residency/
97
+
98
+
99
+ ![thevault-logo](https://raw.githubusercontent.com/FSoft-AI4Code/TheVault/main/assets/thevault-title.png)
100
+
101
+ ## Dataset Summary
102
+ The Vault is a multilingual code-text dataset with over 40 million pairs covering 10 popular programming languages. It is the largest corpus containing parallel code-text data. By building upon [The Stack](https://huggingface.co/datasets/bigcode/the-stack), a massive raw code sample collection, the Vault offers a comprehensive and clean resource for advancing research in code understanding and generation. It also addresses these issues by providing a large, high-quality dataset that includes code-text pairs at multiple levels, such as class and inline-level, in addition to the function level. The Vault can serve many purpose at multiple levels.
103
+
104
+ ## Supported Tasks
105
+ The Vault can be used for pretraining LLMs or downstream code-text interaction tasks. A number of tasks can be constructed using The Vault such as *code summarization*, *text-to-code generation* and *code search*.
106
+
107
+ ## Languages
108
+ The natural language text (docstring) is in English.
109
+
110
+ 10 programming languages are supported in The Vault: `Python`, `Java`, `JavaScript`, `PHP`, `C`, `C#`, `C++`, `Go`, `Ruby`, `Rust`
111
+
112
+ ## Dataset Structure
113
+ ### Data Instances
114
+ *a. Function-level and Class-level*
115
+ ```
116
+ {
117
+ "identifier": "REDUCE",
118
+ "return_type": "<not_specify>"
119
+ "repo": "irshadbhat/sndpcs",
120
+ "path": "arc_eager.py",
121
+ "language": "Python",
122
+ "code": "def REDUCE(self, configuration, label=None):\n b0 = configuration.b0\n configuration.stack.pop()",
123
+ "code_tokens": "def REDUCE ( self , configuration , label = None ) : b0 = configuration . b0 configuration . stack . pop ( )",
124
+ "original_docstring": "\n pops the top of the stack if it has got its head.\n ",
125
+ "comment": "\"\"\"\n pops the top of the stack if it has got its head.\n \"\"\"",
126
+ "docstring_tokens": "pops the top of the stack if it has got its head .",
127
+ "docstring": "pops the top of the stack if it has got its head."
128
+ }
129
+ ```
130
+ ### Data Fields
131
+
132
+ Data fields for function level:
133
+
134
+ - **repo** (string): the owner/repo
135
+ - **path** (string): the full path to the original file
136
+ - **language** (string): the programming language
137
+ - **identifier** (string): the function or method name
138
+ - **return_type** (string): the type returned by the function
139
+ - **original_string** (string): original version of function/class node
140
+ - **original_docstring** (string): the raw string before tokenization or parsing
141
+ - **code** (string): the part of the original that is code
142
+ - **code_tokens** (string): tokenized version of `code`, separated by whitespace
143
+ - **short_docstring** (string): short, brief summarization (first line of the docstring)
144
+ - **short_docstring_tokens** (string): tokenized version of `short_docstring`, separated by whitespace
145
+ - **docstring** (string): the top-level comment or docstring (docstring version without param’s doc, return, exception, etc)
146
+ - **docstring_tokens** tokenized version of docstring, separated by whitespace
147
+ - **comment** (string): comment (line) inside the function/class, separated by `$SEP$` token
148
+ - **parameters** (dict): Dictionary of parameters and its type (type can be None)
149
+ - **docstring_params** (dict): Dictionary of the parsed information from docstring
150
+
151
+ Due to the limiration huggingface data structure we do not contain **parameters** and **docstring_params** field in this repo. The detail of data fields can be found in [The Vault data format](https://github.com/FSoft-AI4Code/TheVault/blob/main/data/README.md) and the full dataset version can be downloaded at [here](https://github.com/FSoft-AI4Code/TheVault/)
152
+ ### Data Splits
153
+
154
+ In this repo, The Vault is divided into 10 subsets based on the supported programming languages. The statistic for each language is illustrated in the following section.
155
+
156
+ ## Dataset Statistics
157
+
158
+ - Compare to other benchmarks
159
+
160
+ | Dataset | #Language | #Code-text pair |
161
+ |:--------------------------|----------:|-----------------:|
162
+ | PyMT5 | 1 | ≈ 7,700,000 |
163
+ | CoDesc | 1 | 4,211,516 |
164
+ | CodeSearchNet | 6 | 2,326,976 |
165
+ | CodeSearchNet (CodeXGLUE) | 6 | 1,005,474 |
166
+ | Deepcom | 1 | 424,028 |
167
+ | CONCODE | 1 | 2,184,310 |
168
+ | Funcom | 1 | 2,149,121 |
169
+ | CodeT5 | 8 | 3,158,313 |
170
+ | **The Vault** | **10** | **40,993,893** |
171
+
172
+ - Statistic for each language in The Vault
173
+
174
+ | Language | #Code-text pair | #Repository |
175
+ |:-----------|-----------------:|------------:|
176
+ | Python | 9,893,858 | 628,069 |
177
+ | PHP | 5,455,989 | 439,514 |
178
+ | JavaScript | 2,562,158 | 355,761 |
179
+ | Java | 7,886,299 | 321,129 |
180
+ | C# | 4,011,467 | 150,657 |
181
+ | C++ | 1,934,958 | 116,897 |
182
+ | C | 1,978,551 | 88,556 |
183
+ | Go | 5,649,158 | 241,238 |
184
+ | Rust | 1,076,588 | 68,615 |
185
+ | Ruby | 544,867 | 61,804 |
186
+
187
+ ## Usage
188
+ You can load The Vault dataset using datasets library: ```pip install datasets```
189
+
190
+ ```python
191
+ from datasets import load_dataset
192
+
193
+ # Load full function level dataset (40M samples)
194
+ ds = load_dataset("Fsoft-AIC/the-vault-function")
195
+
196
+ # Load function level train/validation/test set
197
+ ds = load_dataset("Fsoft-AIC/the-vault-function", split_set=["train"])
198
+
199
+ # Load "small" (or "medium", "large") function level training set
200
+ ds = load_dataset("Fsoft-AIC/the-vault-function", split_set=["train/small"])
201
+
202
+ # specific language (e.g. Golang)
203
+ ds = load_dataset("Fsoft-AIC/the-vault-function", split_set=["train"], languages=['Go'])
204
+ ```
205
+
206
+ ## Additional information
207
+ ### Licensing Information
208
+ ### Citation Information
209
+
210
+ ```
211
+ @misc{manh2023vault,
212
+ title={The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generation},
213
+ author={Dung Nguyen Manh and Nam Le Hai and Anh T. V. Dau and Anh Minh Nguyen and Khanh Nghiem and Jin Guo and Nghi D. Q. Bui},
214
+ year={2023},
215
+ }
216
+ ```
217
+
218
+ ### Contributions