updata load script
Browse files- the-vault-function.py +25 -15
the-vault-function.py
CHANGED
@@ -4,8 +4,29 @@ import pyarrow as pa
|
|
4 |
import pyarrow.parquet as pq
|
5 |
import datasets
|
6 |
|
|
|
|
|
7 |
_REPO_NAME = 'Fsoft-AIC/the-vault-function'
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
_LANG_TO_TEXT = {
|
10 |
"python": "python",
|
11 |
"c": "c",
|
@@ -17,26 +38,13 @@ _LANG_TO_TEXT = {
|
|
17 |
"php": "php",
|
18 |
"ruby": "ruby",
|
19 |
"rust": "rust",
|
20 |
-
}
|
21 |
-
|
22 |
-
|
23 |
-
_DESCRIPTION = """The Vault is a multilingual code-text dataset with over 40 million pairs covering 10 popular programming languages.
|
24 |
-
It is the largest corpus containing parallel code-text data. By building upon The Stack, a massive raw code sample collection,
|
25 |
-
the Vault offers a comprehensive and clean resource for advancing research in code understanding and generation. It provides a
|
26 |
-
high-quality dataset that includes code-text pairs at multiple levels, such as class and inline-level, in addition to the function level.
|
27 |
-
The Vault can serve many purposes at multiple levels."""
|
28 |
-
|
29 |
-
_HOMEPAGE = "https://huggingface.co/Fsoft-AIC"
|
30 |
-
|
31 |
|
32 |
_TEXT_TO_LANG = {}
|
33 |
for lang in _LANG_TO_TEXT:
|
34 |
_TEXT_TO_LANG[_LANG_TO_TEXT[lang]] = lang
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
_LANG_CONFIGS = ["all"] + list(_LANG_TO_TEXT.keys())
|
39 |
-
|
40 |
num_shard_split = {
|
41 |
"train/small/ruby": 1,
|
42 |
"train/small/c": 1,
|
@@ -218,6 +226,8 @@ class TheVaultFunction(datasets.GeneratorBasedBuilder):
|
|
218 |
}),
|
219 |
supervised_keys=None,
|
220 |
homepage=_HOMEPAGE,
|
|
|
|
|
221 |
|
222 |
)
|
223 |
|
|
|
4 |
import pyarrow.parquet as pq
|
5 |
import datasets
|
6 |
|
7 |
+
|
8 |
+
# Meta infomation
|
9 |
_REPO_NAME = 'Fsoft-AIC/the-vault-function'
|
10 |
|
11 |
+
_DESCRIPTION = """The Vault is a multilingual code-text dataset with over 40 million pairs covering 10 popular programming languages.
|
12 |
+
It is the largest corpus containing parallel code-text data. By building upon The Stack, a massive raw code sample collection,
|
13 |
+
the Vault offers a comprehensive and clean resource for advancing research in code understanding and generation. It provides a
|
14 |
+
high-quality dataset that includes code-text pairs at multiple levels, such as class and inline-level, in addition to the function level.
|
15 |
+
The Vault can serve many purposes at multiple levels."""
|
16 |
+
|
17 |
+
_HOMEPAGE = "https://huggingface.co/Fsoft-AIC"
|
18 |
+
_LICENSE = "MIT License"
|
19 |
+
_CITATION = """
|
20 |
+
@article{manh2023vault,
|
21 |
+
title={The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generation},
|
22 |
+
author={Manh, Dung Nguyen and Hai, Nam Le and Dau, Anh TV and Nguyen, Anh Minh and Nghiem, Khanh and Guo, Jin and Bui, Nghi DQ},
|
23 |
+
journal={arXiv preprint arXiv:2305.06156},
|
24 |
+
year={2023}
|
25 |
+
}
|
26 |
+
"""
|
27 |
+
###
|
28 |
+
|
29 |
+
|
30 |
_LANG_TO_TEXT = {
|
31 |
"python": "python",
|
32 |
"c": "c",
|
|
|
38 |
"php": "php",
|
39 |
"ruby": "ruby",
|
40 |
"rust": "rust",
|
41 |
+
}
|
42 |
+
_LANG_CONFIGS = ["all"] + list(_LANG_TO_TEXT.keys())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
_TEXT_TO_LANG = {}
|
45 |
for lang in _LANG_TO_TEXT:
|
46 |
_TEXT_TO_LANG[_LANG_TO_TEXT[lang]] = lang
|
47 |
|
|
|
|
|
|
|
|
|
48 |
num_shard_split = {
|
49 |
"train/small/ruby": 1,
|
50 |
"train/small/c": 1,
|
|
|
226 |
}),
|
227 |
supervised_keys=None,
|
228 |
homepage=_HOMEPAGE,
|
229 |
+
license=_LICENSE,
|
230 |
+
citation=_CITATION,
|
231 |
|
232 |
)
|
233 |
|