albertvillanova HF staff commited on
Commit
a3ca3d7
1 Parent(s): 3dcf6eb

Fix Too Many Requests issue from Zenodo by hosting data (#3)

Browse files

- Track data files by Git LFS (4d9c7b841c1fccdc37212729afbadbae7a25cf35)
- Host java data files (aa966aaf5ebad85f99df93e187f055781cde9f76)
- Update loading script (b728d7705b17067470a961f63e939c2c5f862b76)
- Add citation for java data (e21f8104961f28eb4f291d86130de1e5091854c0)
- Delete legacy metadata JSON file (0b606472eacef94022d2d0d57e3cd71fef95f352)

.gitattributes CHANGED
@@ -25,3 +25,6 @@ saved_model/**/* 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
 
 
 
 
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
28
+ data/java/java_test_pre filter=lfs diff=lfs merge=lfs -text
29
+ data/java/java_training_pre filter=lfs diff=lfs merge=lfs -text
30
+ data/java/java_validation_pre filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -236,6 +236,24 @@ Computational Use of Data Agreement (C-UDA) License.
236
  }
237
  ```
238
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
  ### Contributions
240
 
241
  Thanks to @madlag (and partly also @ncoop57) for adding this dataset.
 
236
  }
237
  ```
238
 
239
+ The data for "java" configuration comes from:
240
+ ```
241
+ @dataset{rafael_michael_karampatsis_2020_3628665,
242
+ author = {Rafael - Michael Karampatsis and
243
+ Hlib Babii and
244
+ Romain Robbes and
245
+ Charles Sutton and
246
+ Andrea Janes},
247
+ title = {Preprocessed Java Code Corpus},
248
+ month = jan,
249
+ year = 2020,
250
+ publisher = {Zenodo},
251
+ version = {1.0},
252
+ doi = {10.5281/zenodo.3628665},
253
+ url = {https://doi.org/10.5281/zenodo.3628665}
254
+ }
255
+ ```
256
+
257
  ### Contributions
258
 
259
  Thanks to @madlag (and partly also @ncoop57) for adding this dataset.
code_x_glue_cc_code_completion_token.py CHANGED
@@ -27,6 +27,20 @@ _CITATION = """@article{raychev2016probabilistic,
27
  pages={207--216},
28
  year={2013},
29
  organization={IEEE}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  }"""
31
 
32
 
@@ -52,7 +66,7 @@ class CodeXGlueCcCodeCompletionTokenJavaImpl(CodeXGlueCcCodeCompletionTokenImpl)
52
  if language != "java":
53
  raise RuntimeError(f"Unknown language {language}: should be java.")
54
 
55
- yield "data", f"https://zenodo.org/record/3628665/files/java_{split_name}_pre"
56
 
57
  def _generate_examples(self, split_name, file_paths):
58
  with open(file_paths["data"], encoding="utf-8") as f:
 
27
  pages={207--216},
28
  year={2013},
29
  organization={IEEE}
30
+ }
31
+ @dataset{rafael_michael_karampatsis_2020_3628665,
32
+ author = {Rafael - Michael Karampatsis and
33
+ Hlib Babii and
34
+ Romain Robbes and
35
+ Charles Sutton and
36
+ Andrea Janes},
37
+ title = {Preprocessed Java Code Corpus},
38
+ month = jan,
39
+ year = 2020,
40
+ publisher = {Zenodo},
41
+ version = {1.0},
42
+ doi = {10.5281/zenodo.3628665},
43
+ url = {https://doi.org/10.5281/zenodo.3628665}
44
  }"""
45
 
46
 
 
66
  if language != "java":
67
  raise RuntimeError(f"Unknown language {language}: should be java.")
68
 
69
+ yield "data", f"https://huggingface.co/datasets/code_x_glue_cc_code_completion_token/resolve/main/data/java/java_{split_name}_pre"
70
 
71
  def _generate_examples(self, split_name, file_paths):
72
  with open(file_paths["data"], encoding="utf-8") as f:
data/java/java_test_pre ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a88cd5c91c2ed23a928528bef3535f4fc8db1359975447211f2b13926cc38d9d
3
+ size 26969670
data/java/java_training_pre ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:676295d2756adcac22e213fbc3ea0f50669a0d152e9497e23a2929e2e2124905
3
+ size 81051708
data/java/java_validation_pre ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c58a97d96aa7435396581ee5efbb93c0e74a545ba5f795f878098a6e59ab8b3
3
+ size 18835141
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"java": {"description": "CodeXGLUE CodeCompletion-token dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/CodeCompletion-token\n\nPredict next code token given context of previous tokens. Models are evaluated by token level accuracy.\nCode completion is a one of the most widely used features in software development through IDEs. An effective code completion tool could improve software developers' productivity. We provide code completion evaluation tasks in two granularities -- token level and line level. Here we introduce token level code completion. Token level task is analogous to language modeling. Models should have be able to predict the next token in arbitary types.\n", "citation": "@article{raychev2016probabilistic,\n title={Probabilistic Model for Code with Decision Trees},\n author={Raychev, Veselin and Bielik, Pavol and Vechev, Martin},\n journal={ACM SIGPLAN Notices},\n pages={731--747},\n year={2016},\n publisher={ACM New York, NY, USA}\n}\n@inproceedings{allamanis2013mining,\n title={Mining Source Code Repositories at Massive Scale using Language Modeling},\n author={Allamanis, Miltiadis and Sutton, Charles},\n booktitle={2013 10th Working Conference on Mining Software Repositories (MSR)},\n pages={207--216},\n year={2013},\n organization={IEEE}\n}", "homepage": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/CodeCompletion-token", "license": "", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "code": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "code_x_glue_cc_code_completion_token", "config_name": "java", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 128312061, "num_examples": 12934, "dataset_name": "code_x_glue_cc_code_completion_token"}, "validation": {"name": "validation", "num_bytes": 30259174, "num_examples": 7189, "dataset_name": "code_x_glue_cc_code_completion_token"}, "test": {"name": "test", "num_bytes": 43027956, "num_examples": 8268, "dataset_name": "code_x_glue_cc_code_completion_token"}}, "download_checksums": {"https://zenodo.org/record/3628665/files/java_training_pre": {"num_bytes": 81051708, "checksum": "676295d2756adcac22e213fbc3ea0f50669a0d152e9497e23a2929e2e2124905"}, "https://zenodo.org/record/3628665/files/java_validation_pre": {"num_bytes": 18835141, "checksum": "0c58a97d96aa7435396581ee5efbb93c0e74a545ba5f795f878098a6e59ab8b3"}, "https://zenodo.org/record/3628665/files/java_test_pre": {"num_bytes": 26969670, "checksum": "a88cd5c91c2ed23a928528bef3535f4fc8db1359975447211f2b13926cc38d9d"}}, "download_size": 126856519, "post_processing_size": null, "dataset_size": 201599191, "size_in_bytes": 328455710}, "python": {"description": "CodeXGLUE CodeCompletion-token dataset, available at https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/CodeCompletion-token\n\nPredict next code token given context of previous tokens. Models are evaluated by token level accuracy.\nCode completion is a one of the most widely used features in software development through IDEs. An effective code completion tool could improve software developers' productivity. We provide code completion evaluation tasks in two granularities -- token level and line level. Here we introduce token level code completion. Token level task is analogous to language modeling. Models should have be able to predict the next token in arbitary types.\n", "citation": "@article{raychev2016probabilistic,\n title={Probabilistic Model for Code with Decision Trees},\n author={Raychev, Veselin and Bielik, Pavol and Vechev, Martin},\n journal={ACM SIGPLAN Notices},\n pages={731--747},\n year={2016},\n publisher={ACM New York, NY, USA}\n}\n@inproceedings{allamanis2013mining,\n title={Mining Source Code Repositories at Massive Scale using Language Modeling},\n author={Allamanis, Miltiadis and Sutton, Charles},\n booktitle={2013 10th Working Conference on Mining Software Repositories (MSR)},\n pages={207--216},\n year={2013},\n organization={IEEE}\n}", "homepage": "https://github.com/madlag/CodeXGLUE/tree/main/Code-Code/CodeCompletion-token", "license": "", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "path": {"dtype": "string", "id": null, "_type": "Value"}, "code": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "code_x_glue_cc_code_completion_token", "config_name": "python", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 684319575, "num_examples": 100000, "dataset_name": "code_x_glue_cc_code_completion_token"}, "test": {"name": "test", "num_bytes": 333978088, "num_examples": 50000, "dataset_name": "code_x_glue_cc_code_completion_token"}}, "download_checksums": {"http://files.srl.inf.ethz.ch/data/py150_files.tar.gz": {"num_bytes": 199067128, "checksum": "73be7f7a78e549845cf80cf779a3bcc3a9cf351ff7017e07b89e8d1c82b8d389"}}, "download_size": 199067128, "post_processing_size": null, "dataset_size": 1018297663, "size_in_bytes": 1217364791}}