parquet-converter commited on
Commit
4d2468a
·
1 Parent(s): 45c1f2e

Update parquet files

Browse files
.gitattributes DELETED
@@ -1,27 +0,0 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bin.* filter=lfs diff=lfs merge=lfs -text
5
- *.bz2 filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.model filter=lfs diff=lfs merge=lfs -text
12
- *.msgpack filter=lfs diff=lfs merge=lfs -text
13
- *.onnx filter=lfs diff=lfs merge=lfs -text
14
- *.ot filter=lfs diff=lfs merge=lfs -text
15
- *.parquet filter=lfs diff=lfs merge=lfs -text
16
- *.pb filter=lfs diff=lfs merge=lfs -text
17
- *.pt filter=lfs diff=lfs merge=lfs -text
18
- *.pth filter=lfs diff=lfs merge=lfs -text
19
- *.rar filter=lfs diff=lfs merge=lfs -text
20
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
- *.tar.* filter=lfs diff=lfs merge=lfs -text
22
- *.tflite filter=lfs diff=lfs merge=lfs -text
23
- *.tgz filter=lfs diff=lfs merge=lfs -text
24
- *.xz filter=lfs diff=lfs merge=lfs -text
25
- *.zip filter=lfs diff=lfs merge=lfs -text
26
- *.zstandard filter=lfs diff=lfs merge=lfs -text
27
- *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md DELETED
@@ -1,186 +0,0 @@
1
- ---
2
- annotations_creators:
3
- - found
4
- language_creators:
5
- - found
6
- language:
7
- - code
8
- - en
9
- license:
10
- - c-uda
11
- multilinguality:
12
- - other-programming-languages
13
- size_categories:
14
- - 100K<n<1M
15
- source_datasets:
16
- - original
17
- task_categories:
18
- - translation
19
- task_ids: []
20
- pretty_name: CodeXGlueTcTextToCode
21
- tags:
22
- - text-to-code
23
- dataset_info:
24
- features:
25
- - name: id
26
- dtype: int32
27
- - name: nl
28
- dtype: string
29
- - name: code
30
- dtype: string
31
- splits:
32
- - name: train
33
- num_bytes: 96225611
34
- num_examples: 100000
35
- - name: validation
36
- num_bytes: 1749751
37
- num_examples: 2000
38
- - name: test
39
- num_bytes: 1609306
40
- num_examples: 2000
41
- download_size: 100769638
42
- dataset_size: 99584668
43
- ---
44
- # Dataset Card for "code_x_glue_tc_text_to_code"
45
-
46
- ## Table of Contents
47
- - [Dataset Description](#dataset-description)
48
- - [Dataset Summary](#dataset-summary)
49
- - [Supported Tasks and Leaderboards](#supported-tasks)
50
- - [Languages](#languages)
51
- - [Dataset Structure](#dataset-structure)
52
- - [Data Instances](#data-instances)
53
- - [Data Fields](#data-fields)
54
- - [Data Splits](#data-splits-sample-size)
55
- - [Dataset Creation](#dataset-creation)
56
- - [Curation Rationale](#curation-rationale)
57
- - [Source Data](#source-data)
58
- - [Annotations](#annotations)
59
- - [Personal and Sensitive Information](#personal-and-sensitive-information)
60
- - [Considerations for Using the Data](#considerations-for-using-the-data)
61
- - [Social Impact of Dataset](#social-impact-of-dataset)
62
- - [Discussion of Biases](#discussion-of-biases)
63
- - [Other Known Limitations](#other-known-limitations)
64
- - [Additional Information](#additional-information)
65
- - [Dataset Curators](#dataset-curators)
66
- - [Licensing Information](#licensing-information)
67
- - [Citation Information](#citation-information)
68
- - [Contributions](#contributions)
69
-
70
- ## Dataset Description
71
-
72
- - **Homepage:** https://github.com/microsoft/CodeXGLUE/tree/main/Text-Code/text-to-code
73
-
74
- ### Dataset Summary
75
-
76
- CodeXGLUE text-to-code dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Text-Code/text-to-code
77
-
78
- The dataset we use is crawled and filtered from Microsoft Documentation, whose document located at https://github.com/MicrosoftDocs/.
79
-
80
- ### Supported Tasks and Leaderboards
81
-
82
- - `machine-translation`: The dataset can be used to train a model for generating Java code from an **English** natural language description.
83
-
84
- ### Languages
85
-
86
- - Java **programming** language
87
-
88
- ## Dataset Structure
89
-
90
- ### Data Instances
91
-
92
- An example of 'train' looks as follows.
93
- ```
94
- {
95
- "code": "boolean function ( ) { return isParsed ; }",
96
- "id": 0,
97
- "nl": "check if details are parsed . concode_field_sep Container parent concode_elem_sep boolean isParsed concode_elem_sep long offset concode_elem_sep long contentStartPosition concode_elem_sep ByteBuffer deadBytes concode_elem_sep boolean isRead concode_elem_sep long memMapSize concode_elem_sep Logger LOG concode_elem_sep byte[] userType concode_elem_sep String type concode_elem_sep ByteBuffer content concode_elem_sep FileChannel fileChannel concode_field_sep Container getParent concode_elem_sep byte[] getUserType concode_elem_sep void readContent concode_elem_sep long getOffset concode_elem_sep long getContentSize concode_elem_sep void getContent concode_elem_sep void setDeadBytes concode_elem_sep void parse concode_elem_sep void getHeader concode_elem_sep long getSize concode_elem_sep void parseDetails concode_elem_sep String getType concode_elem_sep void _parseDetails concode_elem_sep String getPath concode_elem_sep boolean verify concode_elem_sep void setParent concode_elem_sep void getBox concode_elem_sep boolean isSmallBox"
98
- }
99
- ```
100
-
101
- ### Data Fields
102
-
103
- In the following each data field in go is explained for each config. The data fields are the same among all splits.
104
-
105
- #### default
106
-
107
- |field name| type | description |
108
- |----------|------|---------------------------------------------|
109
- |id |int32 | Index of the sample |
110
- |nl |string| The natural language description of the task|
111
- |code |string| The programming source code for the task |
112
-
113
- ### Data Splits
114
-
115
- | name |train |validation|test|
116
- |-------|-----:|---------:|---:|
117
- |default|100000| 2000|2000|
118
-
119
- ## Dataset Creation
120
-
121
- ### Curation Rationale
122
-
123
- [More Information Needed]
124
-
125
- ### Source Data
126
-
127
- #### Initial Data Collection and Normalization
128
-
129
- [More Information Needed]
130
-
131
- #### Who are the source language producers?
132
-
133
- [More Information Needed]
134
-
135
- ### Annotations
136
-
137
- #### Annotation process
138
-
139
- [More Information Needed]
140
-
141
- #### Who are the annotators?
142
-
143
- [More Information Needed]
144
-
145
- ### Personal and Sensitive Information
146
-
147
- [More Information Needed]
148
-
149
- ## Considerations for Using the Data
150
-
151
- ### Social Impact of Dataset
152
-
153
- [More Information Needed]
154
-
155
- ### Discussion of Biases
156
-
157
- [More Information Needed]
158
-
159
- ### Other Known Limitations
160
-
161
- [More Information Needed]
162
-
163
- ## Additional Information
164
-
165
- ### Dataset Curators
166
-
167
- https://github.com/microsoft, https://github.com/madlag
168
-
169
- ### Licensing Information
170
-
171
- Computational Use of Data Agreement (C-UDA) License.
172
-
173
- ### Citation Information
174
-
175
- ```
176
- @article{iyer2018mapping,
177
- title={Mapping language to code in programmatic context},
178
- author={Iyer, Srinivasan and Konstas, Ioannis and Cheung, Alvin and Zettlemoyer, Luke},
179
- journal={arXiv preprint arXiv:1808.09588},
180
- year={2018}
181
- }
182
- ```
183
-
184
- ### Contributions
185
-
186
- Thanks to @madlag (and partly also @ncoop57) for adding this dataset.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
code_x_glue_tc_text_to_code.py DELETED
@@ -1,69 +0,0 @@
1
- import json
2
- from typing import List
3
-
4
- import datasets
5
-
6
- from .common import Child
7
- from .generated_definitions import DEFINITIONS
8
-
9
-
10
- _DESCRIPTION = """We use concode dataset which is a widely used code generation dataset from Iyer's EMNLP 2018 paper Mapping Language to Code in Programmatic Context. See paper for details."""
11
- _CITATION = """@article{iyer2018mapping,
12
- title={Mapping language to code in programmatic context},
13
- author={Iyer, Srinivasan and Konstas, Ioannis and Cheung, Alvin and Zettlemoyer, Luke},
14
- journal={arXiv preprint arXiv:1808.09588},
15
- year={2018}
16
- }"""
17
-
18
-
19
- class CodeXGlueTcTextToCodeImpl(Child):
20
- _DESCRIPTION = _DESCRIPTION
21
- _CITATION = _CITATION
22
-
23
- _FEATURES = {
24
- "id": datasets.Value("int32"), # Index of the sample
25
- "nl": datasets.Value("string"), # The natural language description of the task
26
- "code": datasets.Value("string"), # The programming source code for the task
27
- }
28
-
29
- _SUPERVISED_KEYS = ["code"]
30
-
31
- SPLITS = {"train": datasets.Split.TRAIN, "dev": datasets.Split.VALIDATION, "test": datasets.Split.TEST}
32
-
33
- def generate_urls(self, split_name):
34
- yield "data", f"concode/{split_name}.json"
35
-
36
- def _generate_examples(self, split_name, file_paths):
37
- with open(file_paths["data"], encoding="utf-8") as f:
38
- for idx, line in enumerate(f):
39
- entry = json.loads(line)
40
- entry["id"] = idx
41
- yield idx, entry
42
-
43
-
44
- CLASS_MAPPING = {
45
- "CodeXGlueTcTextToCode": CodeXGlueTcTextToCodeImpl,
46
- }
47
-
48
-
49
- class CodeXGlueTcTextToCode(datasets.GeneratorBasedBuilder):
50
- BUILDER_CONFIG_CLASS = datasets.BuilderConfig
51
- BUILDER_CONFIGS = [
52
- datasets.BuilderConfig(name=name, description=info["description"]) for name, info in DEFINITIONS.items()
53
- ]
54
-
55
- def _info(self):
56
- name = self.config.name
57
- info = DEFINITIONS[name]
58
- if info["class_name"] in CLASS_MAPPING:
59
- self.child = CLASS_MAPPING[info["class_name"]](info)
60
- else:
61
- raise RuntimeError(f"Unknown python class for dataset configuration {name}")
62
- ret = self.child._info()
63
- return ret
64
-
65
- def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
66
- return self.child._split_generators(dl_manager=dl_manager)
67
-
68
- def _generate_examples(self, split_name, file_paths):
69
- return self.child._generate_examples(split_name, file_paths)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
common.py DELETED
@@ -1,75 +0,0 @@
1
- from typing import List
2
-
3
- import datasets
4
-
5
-
6
- # Citation, taken from https://github.com/microsoft/CodeXGLUE
7
- _DEFAULT_CITATION = """@article{CodeXGLUE,
8
- title={CodeXGLUE: A Benchmark Dataset and Open Challenge for Code Intelligence},
9
- year={2020},}"""
10
-
11
-
12
- class Child:
13
- _DESCRIPTION = None
14
- _FEATURES = None
15
- _CITATION = None
16
- SPLITS = {"train": datasets.Split.TRAIN}
17
- _SUPERVISED_KEYS = None
18
-
19
- def __init__(self, info):
20
- self.info = info
21
-
22
- def homepage(self):
23
- return self.info["project_url"]
24
-
25
- def _info(self):
26
- # This is the description that will appear on the datasets page.
27
- return datasets.DatasetInfo(
28
- description=self.info["description"] + "\n\n" + self._DESCRIPTION,
29
- features=datasets.Features(self._FEATURES),
30
- homepage=self.homepage(),
31
- citation=self._CITATION or _DEFAULT_CITATION,
32
- supervised_keys=self._SUPERVISED_KEYS,
33
- )
34
-
35
- def _split_generators(self, dl_manager: datasets.DownloadManager) -> List[datasets.SplitGenerator]:
36
- SPLITS = self.SPLITS
37
- _URL = self.info["raw_url"]
38
- urls_to_download = {}
39
- for split in SPLITS:
40
- if split not in urls_to_download:
41
- urls_to_download[split] = {}
42
-
43
- for key, url in self.generate_urls(split):
44
- if not url.startswith("http"):
45
- url = _URL + "/" + url
46
- urls_to_download[split][key] = url
47
-
48
- downloaded_files = {}
49
- for k, v in urls_to_download.items():
50
- downloaded_files[k] = dl_manager.download_and_extract(v)
51
-
52
- return [
53
- datasets.SplitGenerator(
54
- name=SPLITS[k],
55
- gen_kwargs={"split_name": k, "file_paths": downloaded_files[k]},
56
- )
57
- for k in SPLITS
58
- ]
59
-
60
- def check_empty(self, entries):
61
- all_empty = all([v == "" for v in entries.values()])
62
- all_non_empty = all([v != "" for v in entries.values()])
63
-
64
- if not all_non_empty and not all_empty:
65
- raise RuntimeError("Parallel data files should have the same number of lines.")
66
-
67
- return all_empty
68
-
69
-
70
- class TrainValidTestChild(Child):
71
- SPLITS = {
72
- "train": datasets.Split.TRAIN,
73
- "valid": datasets.Split.VALIDATION,
74
- "test": datasets.Split.TEST,
75
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"default": {"description": "CodeXGLUE text-to-code dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Text-Code/text-to-code\n\nWe use concode dataset which is a widely used code generation dataset from Iyer's EMNLP 2018 paper Mapping Language to Code in Programmatic Context. See paper for details.", "citation": "@article{iyer2018mapping,\ntitle={Mapping language to code in programmatic context},\nauthor={Iyer, Srinivasan and Konstas, Ioannis and Cheung, Alvin and Zettlemoyer, Luke},\njournal={arXiv preprint arXiv:1808.09588},\nyear={2018}\n}", "homepage": "https://github.com/madlag/CodeXGLUE/tree/main/Text-Code/text-to-code", "license": "", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "nl": {"dtype": "string", "id": null, "_type": "Value"}, "code": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": {"input": "code", "output": ""}, "task_templates": null, "builder_name": "code_x_glue_tc_text_to_code", "config_name": "default", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 96225611, "num_examples": 100000, "dataset_name": "code_x_glue_tc_text_to_code"}, "validation": {"name": "validation", "num_bytes": 1749751, "num_examples": 2000, "dataset_name": "code_x_glue_tc_text_to_code"}, "test": {"name": "test", "num_bytes": 1609306, "num_examples": 2000, "dataset_name": "code_x_glue_tc_text_to_code"}}, "download_checksums": {"https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Text-Code/text-to-code/dataset/concode/train.json": {"num_bytes": 97365680, "checksum": "a130f375c415932ffe0188e76b3c8aaef92b1b52d228e342328657b9ae97f17f"}, "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Text-Code/text-to-code/dataset/concode/dev.json": {"num_bytes": 1772646, "checksum": "cd4f91cfaa12a886a1d7acaf92eaf8ab066845c37a9221e56634d345958c922a"}, "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Text-Code/text-to-code/dataset/concode/test.json": {"num_bytes": 1631312, "checksum": "3323b1d723c2183a0ef4693413d25ef5a6b988b50b37b2f401de6c2c5c55159f"}}, "download_size": 100769638, "post_processing_size": null, "dataset_size": 99584668, "size_in_bytes": 200354306}}
 
 
default/code_x_glue_tc_text_to_code-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6186ac91bf2e6229671120b5e98945d6dff3789fe0931e2d3e56ee90d26547f5
3
+ size 526046
default/code_x_glue_tc_text_to_code-train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:781fd829c48bc5b21aed5334ec66eb9270faff425d585ec858fb5488a5a70a4c
3
+ size 33097825
default/code_x_glue_tc_text_to_code-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d36db2afb242dccafdc8c5f1ee014d9656b9cf46ecf7b84e28d431b6124031bf
3
+ size 634480
generated_definitions.py DELETED
@@ -1,12 +0,0 @@
1
- DEFINITIONS = {
2
- "default": {
3
- "class_name": "CodeXGlueTcTextToCode",
4
- "dataset_type": "Text-Code",
5
- "description": "CodeXGLUE text-to-code dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Text-Code/text-to-code",
6
- "dir_name": "text-to-code",
7
- "name": "default",
8
- "project_url": "https://github.com/madlag/CodeXGLUE/tree/main/Text-Code/text-to-code",
9
- "raw_url": "https://raw.githubusercontent.com/madlag/CodeXGLUE/main/Text-Code/text-to-code/dataset",
10
- "sizes": {"test": 2000, "train": 100000, "validation": 2000},
11
- }
12
- }