jordiae commited on
Commit
74e8192
·
1 Parent(s): b74d6b8

Update exebench.py

Browse files
Files changed (1) hide show
  1. exebench.py +40 -25
exebench.py CHANGED
@@ -20,7 +20,22 @@ from pathlib import Path
20
 
21
 
22
  _CITATION = """\
23
- @misc{TODO
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  }
25
  """
26
 
@@ -126,36 +141,36 @@ class ExeBench(datasets.GeneratorBasedBuilder):
126
  def _split_generators(self, dl_manager):
127
  """Returns SplitGenerators."""
128
  urls_to_download = {
129
- # "train_not_compilable": f"{_URL}train_not_compilable.tar.gz",
130
- #"train_synth_compilable": f"{_URL}train_synth_compilable.tar.gz",
131
- # "train_real_compilable": f"{_URL}train_real_compilable.tar.gz",
132
- #"train_synth_simple_io": f"{_URL}train_synth_simple_io.tar.gz",
133
- # "train_real_simple_io": f"{_URL}train_real_simple_io.tar.gz",
134
- #"train_synth_rich_io": f"{_URL}train_synth_rich_io.tar.gz",
135
- #"valid_synth": f"{_URL}valid_synth.tar.gz",
136
- # "valid_real": f"{_URL}valid_real.tar.gz",
137
  "test_synth": f"{_URL}test_synth.tar.gz",
138
  "test_real": f"{_URL}test_real.tar.gz",
139
  }
140
  downloaded_files = dl_manager.download_and_extract(urls_to_download)
141
 
142
  return [
143
- #datasets.SplitGenerator(name='train_not_compilable',
144
- # gen_kwargs={"files": downloaded_files["train_not_compilable"]}),
145
- #datasets.SplitGenerator(name='train_synth_compilable',
146
- # gen_kwargs={"files": downloaded_files["train_synth_compilable"]}),
147
- #datasets.SplitGenerator(name='train_real_compilable',
148
- # gen_kwargs={"files": downloaded_files["train_real_compilable"]}),
149
- #datasets.SplitGenerator(name='train_synth_simple_io',
150
- # gen_kwargs={"files": downloaded_files["train_synth_simple_io"]}),
151
- #datasets.SplitGenerator(name='train_real_simple_io',
152
- # gen_kwargs={"files": downloaded_files["train_real_simple_io"]}),
153
- #datasets.SplitGenerator(name='train_synth_rich_io',
154
- # gen_kwargs={"files": downloaded_files["train_synth_rich_io"]}),
155
- #datasets.SplitGenerator(name='valid_synth',
156
- # gen_kwargs={"files": downloaded_files["valid_synth"]}),
157
- #datasets.SplitGenerator(name='valid_real',
158
- # gen_kwargs={"files": downloaded_files["valid_real"]}),
159
  datasets.SplitGenerator(name='test_synth',
160
  gen_kwargs={"files": downloaded_files["test_synth"]}),
161
  datasets.SplitGenerator(name='test_real',
 
20
 
21
 
22
  _CITATION = """\
23
+ @inproceedings{10.1145/3520312.3534867,
24
+ author = {Armengol-Estap\'{e}, Jordi and Woodruff, Jackson and Brauckmann, Alexander and Magalh\~{a}es, Jos\'{e} Wesley de Souza and O'Boyle, Michael F. P.},
25
+ title = {ExeBench: An ML-Scale Dataset of Executable C Functions},
26
+ year = {2022},
27
+ isbn = {9781450392730},
28
+ publisher = {Association for Computing Machinery},
29
+ address = {New York, NY, USA},
30
+ url = {https://doi.org/10.1145/3520312.3534867},
31
+ doi = {10.1145/3520312.3534867},
32
+ abstract = {Machine-learning promises to transform compilation and software engineering, yet is frequently limited by the scope of available datasets. In particular, there is a lack of runnable, real-world datasets required for a range of tasks ranging from neural program synthesis to machine learning-guided program optimization. We introduce a new dataset, ExeBench, which attempts to address this. It tackles two key issues with real-world code: references to external types and functions and scalable generation of IO examples. ExeBench is the first publicly available dataset that pairs real-world C code taken from GitHub with IO examples that allow these programs to be run. We develop a toolchain that scrapes GitHub, analyzes the code, and generates runnable snippets of code. We analyze our benchmark suite using several metrics, and show it is representative of real-world code. ExeBench contains 4.5M compilable and 700k executable C functions. This scale of executable, real functions will enable the next generation of machine learning-based programming tasks.},
33
+ booktitle = {Proceedings of the 6th ACM SIGPLAN International Symposium on Machine Programming},
34
+ pages = {50–59},
35
+ numpages = {10},
36
+ keywords = {Code Dataset, Program Synthesis, Mining Software Repositories, C, Machine Learning for Code, Compilers},
37
+ location = {San Diego, CA, USA},
38
+ series = {MAPS 2022}
39
  }
40
  """
41
 
 
141
  def _split_generators(self, dl_manager):
142
  """Returns SplitGenerators."""
143
  urls_to_download = {
144
+ "train_not_compilable": f"{_URL}train_not_compilable.tar.gz",
145
+ "train_synth_compilable": f"{_URL}train_synth_compilable.tar.gz",
146
+ "train_real_compilable": f"{_URL}train_real_compilable.tar.gz",
147
+ "train_synth_simple_io": f"{_URL}train_synth_simple_io.tar.gz",
148
+ "train_real_simple_io": f"{_URL}train_real_simple_io.tar.gz",
149
+ "train_synth_rich_io": f"{_URL}train_synth_rich_io.tar.gz",
150
+ "valid_synth": f"{_URL}valid_synth.tar.gz",
151
+ "valid_real": f"{_URL}valid_real.tar.gz",
152
  "test_synth": f"{_URL}test_synth.tar.gz",
153
  "test_real": f"{_URL}test_real.tar.gz",
154
  }
155
  downloaded_files = dl_manager.download_and_extract(urls_to_download)
156
 
157
  return [
158
+ datasets.SplitGenerator(name='train_not_compilable',
159
+ gen_kwargs={"files": downloaded_files["train_not_compilable"]}),
160
+ datasets.SplitGenerator(name='train_synth_compilable',
161
+ gen_kwargs={"files": downloaded_files["train_synth_compilable"]}),
162
+ datasets.SplitGenerator(name='train_real_compilable',
163
+ gen_kwargs={"files": downloaded_files["train_real_compilable"]}),
164
+ datasets.SplitGenerator(name='train_synth_simple_io',
165
+ gen_kwargs={"files": downloaded_files["train_synth_simple_io"]}),
166
+ datasets.SplitGenerator(name='train_real_simple_io',
167
+ gen_kwargs={"files": downloaded_files["train_real_simple_io"]}),
168
+ datasets.SplitGenerator(name='train_synth_rich_io',
169
+ gen_kwargs={"files": downloaded_files["train_synth_rich_io"]}),
170
+ datasets.SplitGenerator(name='valid_synth',
171
+ gen_kwargs={"files": downloaded_files["valid_synth"]}),
172
+ datasets.SplitGenerator(name='valid_real',
173
+ gen_kwargs={"files": downloaded_files["valid_real"]}),
174
  datasets.SplitGenerator(name='test_synth',
175
  gen_kwargs={"files": downloaded_files["test_synth"]}),
176
  datasets.SplitGenerator(name='test_real',