arjunguha commited on
Commit
c0d6f65
1 Parent(s): d23b094

MultiPL-E v3 prompts and tests

Browse files
Files changed (48) hide show
  1. MultiPL-E.py +0 -116
  2. README.md +0 -0
  3. dataset_infos.json +0 -0
  4. how_to_update.txt +0 -6
  5. humaneval-clj/test-00000-of-00001.parquet +3 -0
  6. humaneval-cpp/test-00000-of-00001.parquet +3 -0
  7. humaneval-cs/test-00000-of-00001.parquet +3 -0
  8. humaneval-d/test-00000-of-00001.parquet +3 -0
  9. humaneval-elixir/test-00000-of-00001.parquet +3 -0
  10. humaneval-go/test-00000-of-00001.parquet +3 -0
  11. humaneval-hs/test-00000-of-00001.parquet +3 -0
  12. humaneval-java/test-00000-of-00001.parquet +3 -0
  13. humaneval-jl/test-00000-of-00001.parquet +3 -0
  14. humaneval-js/test-00000-of-00001.parquet +3 -0
  15. humaneval-lua/test-00000-of-00001.parquet +3 -0
  16. humaneval-ml/test-00000-of-00001.parquet +3 -0
  17. humaneval-php/test-00000-of-00001.parquet +3 -0
  18. humaneval-pl/test-00000-of-00001.parquet +3 -0
  19. humaneval-r/test-00000-of-00001.parquet +3 -0
  20. humaneval-rb/test-00000-of-00001.parquet +3 -0
  21. humaneval-rkt/test-00000-of-00001.parquet +3 -0
  22. humaneval-rs/test-00000-of-00001.parquet +3 -0
  23. humaneval-scala/test-00000-of-00001.parquet +3 -0
  24. humaneval-sh/test-00000-of-00001.parquet +3 -0
  25. humaneval-swift/test-00000-of-00001.parquet +3 -0
  26. humaneval-ts/test-00000-of-00001.parquet +3 -0
  27. mbpp-clj/test-00000-of-00001.parquet +3 -0
  28. mbpp-cpp/test-00000-of-00001.parquet +3 -0
  29. mbpp-cs/test-00000-of-00001.parquet +3 -0
  30. mbpp-d/test-00000-of-00001.parquet +3 -0
  31. mbpp-elixir/test-00000-of-00001.parquet +3 -0
  32. mbpp-go/test-00000-of-00001.parquet +3 -0
  33. mbpp-hs/test-00000-of-00001.parquet +3 -0
  34. mbpp-java/test-00000-of-00001.parquet +3 -0
  35. mbpp-jl/test-00000-of-00001.parquet +3 -0
  36. mbpp-js/test-00000-of-00001.parquet +3 -0
  37. mbpp-lua/test-00000-of-00001.parquet +3 -0
  38. mbpp-ml/test-00000-of-00001.parquet +3 -0
  39. mbpp-php/test-00000-of-00001.parquet +3 -0
  40. mbpp-pl/test-00000-of-00001.parquet +3 -0
  41. mbpp-r/test-00000-of-00001.parquet +3 -0
  42. mbpp-rb/test-00000-of-00001.parquet +3 -0
  43. mbpp-rkt/test-00000-of-00001.parquet +3 -0
  44. mbpp-rs/test-00000-of-00001.parquet +3 -0
  45. mbpp-scala/test-00000-of-00001.parquet +3 -0
  46. mbpp-sh/test-00000-of-00001.parquet +3 -0
  47. mbpp-swift/test-00000-of-00001.parquet +3 -0
  48. mbpp-ts/test-00000-of-00001.parquet +3 -0
MultiPL-E.py DELETED
@@ -1,116 +0,0 @@
1
- import json
2
- import datasets
3
- from pathlib import Path
4
-
5
- logger = datasets.logging.get_logger(__name__)
6
-
7
- _CITATION = """\
8
- @article{cassano:multipl-e,
9
- author = {Cassano, Federico and Gouwar, John and Nguyen, Daniel and Nguyen, Sydney and
10
- Phipps-Costin, Luna and Pinckney, Donald and Yee, Ming-Ho and Zi, Yangtian and
11
- Anderson, Carolyn Jane and Feldman, Molly Q and Guha, Arjun and
12
- Greenberg, Michael and Jangda, Abhinav},
13
- title = {{MultiPL-E}: A Scalable and Polyglot Approach to Benchmarking Neural Code Generation},
14
- journal = "{IEEE} Transactions of Software Engineering (TSE)",
15
- year = 2023
16
- }"""
17
-
18
- _DESCRIPTION = """\
19
- MultiPL-E is a dataset for evaluating large language models for code \
20
- generation that supports 18 programming languages. It takes the OpenAI \
21
- "HumanEval" and the MBPP Python benchmarks and uses little compilers to \
22
- translate them to other languages. It is easy to add support for new languages \
23
- and benchmarks.
24
- """
25
-
26
- _SRCDATA = [ "humaneval", "mbpp" ]
27
-
28
- _LANGUAGES = [
29
- "cpp", "cs", "d", "go", "java", "jl", "js", "lua", "php", "pl", "py", "r",
30
- "rb", "rkt", "rs", "scala", "sh", "swift", "ts"
31
- ]
32
-
33
- _VARIATIONS = [ "keep", "transform", "reworded", "remove" ]
34
-
35
- class MultiPLEBuilderConfig(datasets.BuilderConfig):
36
- """BuilderConfig for MultiPLEBuilderConfig."""
37
-
38
- def __init__(
39
- self,
40
- srcdata,
41
- language,
42
- variation,
43
- **kwargs,
44
- ):
45
- self.language = language
46
- self.variation = variation
47
- self.srcdata = srcdata
48
- name = f"{srcdata}-{language}"
49
- if variation != "reworded":
50
- name = f"{name}-{variation}"
51
- kwargs["name"] = name
52
- super(MultiPLEBuilderConfig, self).__init__(**kwargs)
53
-
54
- def _is_interesting(srcdata: str, variation: str):
55
- if srcdata == "humaneval":
56
- return True
57
- if srcdata == "mbpp":
58
- # MBPP does not have doctests, so these are the only interesting
59
- # variations
60
- return variation in [ "keep", "reworded" ]
61
-
62
- class MultiPLE(datasets.GeneratorBasedBuilder):
63
- BUILDER_CONFIG_CLASS = MultiPLEBuilderConfig
64
-
65
- BUILDER_CONFIGS = [
66
- MultiPLEBuilderConfig(
67
- srcdata=srcdata,
68
- language=language,
69
- variation=variation,
70
- version=datasets.Version("2.1.0"))
71
- for srcdata in _SRCDATA
72
- for language in _LANGUAGES
73
- for variation in _VARIATIONS
74
- if _is_interesting(srcdata, variation)
75
- ]
76
-
77
- DEFAULT_CONFIG_NAME = "humaneval-cpp"
78
-
79
- def _info(self):
80
- return datasets.DatasetInfo(
81
- description=_DESCRIPTION,
82
- license="MIT",
83
- features=datasets.Features({
84
- "name": datasets.Value("string"),
85
- "language": datasets.Value("string"),
86
- "prompt": datasets.Value("string"),
87
- "doctests": datasets.Value("string"),
88
- "original": datasets.Value("string"),
89
- "prompt_terminology": datasets.Value("string"),
90
- "tests": datasets.Value("string"),
91
- "stop_tokens": datasets.features.Sequence(datasets.Value("string")),
92
- }),
93
- supervised_keys=None,
94
- homepage="https://nuprl.github.io/MultiPL-E/",
95
- citation=_CITATION,
96
- task_templates=[]
97
- )
98
-
99
- def _split_generators(self, dl_manager: datasets.DownloadManager):
100
- files = dl_manager.download(
101
- f"https://raw.githubusercontent.com/nuprl/MultiPL-E/11b407bd2dd98c8204afea4d20043faf2145c20c/prompts/{self.config.srcdata}-{self.config.language}-{self.config.variation}.json"
102
- )
103
- return [
104
- datasets.SplitGenerator(
105
- name=datasets.Split.TEST,
106
- gen_kwargs={
107
- "filepath": files,
108
- }
109
- )
110
- ]
111
-
112
- def _generate_examples(self, filepath):
113
- with open(filepath, encoding="utf-8") as f:
114
- data = json.load(f)
115
- for id_, row in enumerate(data):
116
- yield id_, row
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md CHANGED
The diff for this file is too large to render. See raw diff
 
dataset_infos.json DELETED
The diff for this file is too large to render. See raw diff
 
how_to_update.txt DELETED
@@ -1,6 +0,0 @@
1
- To update this dataset:
2
-
3
- 1. Edit the commit hash in MultiPL-E.py (line 106)
4
-
5
- 2. Run `datasets-cli test MultiPL-E.py --save_info --all_configs` to regenerate
6
- `dataset_infos.json`.
 
 
 
 
 
 
 
humaneval-clj/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a9da8c597ccb4061edb9c8c3c04325ca884b893864867e58cabd7e26bc1b3918
3
+ size 70395
humaneval-cpp/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4492dd06d3280dd32aa6245d806f00553350be3fc45454aeff3c71b29196ce6
3
+ size 83221
humaneval-cs/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cfbfb0bf7d899a3f01f7a130274abf85c46cad678305a98143310abaf2759c54
3
+ size 82080
humaneval-d/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e999c444d9c67c2b12e664aabcdfdb6f175fd5a00a2a221d1ef5b9c2e3c8b362
3
+ size 70027
humaneval-elixir/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa9cfa090acd4657ec782efbc15494f7644f92a7ee691a1d5692ee3bd8148fd0
3
+ size 74798
humaneval-go/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ea500a7b7a05e80d42512d77a9a8362ba3372d1792a19cd5da79818aa0bb5a2
3
+ size 78121
humaneval-hs/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd43a81ef3e18d5c489564379dc6fdb1df02dcb2608b94599f38e7646ca138ec
3
+ size 69373
humaneval-java/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9cce8fdfc46963aa9c9db85eaa8411d151fb9cb82e94b57b4106884eab28b6c
3
+ size 86178
humaneval-jl/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:65620849ce6af8c5115ef5172222d4eae8272fa49575da85fc496fdbfce17c54
3
+ size 68620
humaneval-js/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:037debd61e3e98ee9da684054ef522d45200ce622ae36b2fab3bbb27769fa51d
3
+ size 70034
humaneval-lua/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2904afd9f69243a195fc35c2416677d1855d8aac969ed2bd2f65d8940f9df064
3
+ size 70547
humaneval-ml/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f821c250c6beedf0c9739037a84d214fe7c1dac2dea2869033b91bc377e01a24
3
+ size 68199
humaneval-php/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d3fe53578f7fbb76db944237b011f52ab61982601b6e7971de183836d97f0428
3
+ size 75195
humaneval-pl/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bdd4a07c29cc1d8d65b58bbf32e203156ed988ef24af4f2c0760dc245bf5c6ce
3
+ size 77247
humaneval-r/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91579137a533bdee64a0a7712e1714aa9397ae77b4375b493ee08d234bcfde89
3
+ size 71602
humaneval-rb/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:636f909f9f6b2b6f70892035ea9c4fbe272ae43aff96ce82793167fed4ad1bea
3
+ size 72942
humaneval-rkt/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:361a03e8e1f69954e3cb70adadb16721eea6e84f94f35def7ecd7cf8abf7aa27
3
+ size 70785
humaneval-rs/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:92dba15e4da4deb4dbae5e15ce1712c95ec5a63c3ead69886271470309d9d314
3
+ size 75300
humaneval-scala/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:24873f8f8f0afcac5bef53bbb71a892284024a87ea9abd8d6a03237a8ad76b72
3
+ size 80950
humaneval-sh/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a472100ae3a45b51ee445ab40343aa19950b58081565f3e75bbe0f0979012901
3
+ size 67691
humaneval-swift/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:164396c1955127d130dae7d39d02a58f39e23590e78ad273fe1c05e4c884f7df
3
+ size 78057
humaneval-ts/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7aefebd1be96cfe9f6d83f477977beb82a94e5f72c9917d57fd936a00876554a
3
+ size 70427
mbpp-clj/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ee3c64175d55bc4b455fac8c9249804fc9c4bd1a7aaa91e76eda68c6db3e0a29
3
+ size 76741
mbpp-cpp/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1f1c96f54f381b70f71ade353cb2754b1429181adb814b18f6b0a823f6ec438a
3
+ size 97734
mbpp-cs/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:92de984507738af72bcfb7be97382f1f5679e6417d6b719ad0aed381b677641f
3
+ size 99239
mbpp-d/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb2c58bff16cc3ee464273741cb2a83da223619fab3129375374684d0a6a92e7
3
+ size 73269
mbpp-elixir/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a86290c25d97644e242c5f17d4b848550cd4ae540c623053bcdc7b177e724396
3
+ size 84803
mbpp-go/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bd55cddf40ac595e8cd7b7788f6f4684c31e130c90fc451b450ac911dc5628b7
3
+ size 93635
mbpp-hs/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:00823f7405add1da3108e05cba9e159eeb132e0da7185535bc13c24a6be87e71
3
+ size 71870
mbpp-java/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bdcd577b56a0a66b340c6326569e9b4234c21860a373474d7d5c1d93658e620f
3
+ size 99991
mbpp-jl/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b01dd5f590a675d10cb2f53ae970ed50f42f3bceb2890f2517e66eabe93aeb2a
3
+ size 77046
mbpp-js/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2e30c57e2e31be8b30af2b18fce6245730a3a520cd79fe16088066c55330ed1d
3
+ size 78109
mbpp-lua/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:49955f8bfa1b832628005ec3426df297ed66fb195d734e6e6799bb72b364a069
3
+ size 78701
mbpp-ml/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3984536d16d51bd9185546f441cf60bde4b1c1727010c33e1871dbdb455f4c3a
3
+ size 69995
mbpp-php/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82d9fd8dfdb7bf5b484887c343a3041c0ceb16409fa743fd23dda7e305e43efb
3
+ size 82614
mbpp-pl/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:59765bb6e948ecdd2323dbedbc3d9eb6542d37ceaec89a6625775538df167fce
3
+ size 83295
mbpp-r/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62bba763b0a0550abbf7790263a2faf8078e739cb314dbc2d31a1c76c7bb62ac
3
+ size 78685
mbpp-rb/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed478a353b966763656bbf2c72c61a6690f8e77a02a8f6c513cc5eb010911ab7
3
+ size 82986
mbpp-rkt/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:546e5fcd8321f18620d1e9d5bd93d49fa544596edd5bcd782cf2e84b65f4cb70
3
+ size 77882
mbpp-rs/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1a8bad3f3dd05b465ab9545331c30a25a48779bb60a356c84a7954837ae7e4e
3
+ size 72084
mbpp-scala/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cea0a67b62cf1834ff330e00d3a198e242f8dbddbf1c5e2ae5c8a458386d6d45
3
+ size 92626
mbpp-sh/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f9eb6e1bc0a8e999cd153d44e1d635a37663f573f89198e240f08f6a8cd366b5
3
+ size 69685
mbpp-swift/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f73ef2153d7107e8a9c1d334c94390779eed93ceca1ecd32eaf4e219f5b666d
3
+ size 89609
mbpp-ts/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5c77c4acd23c26d08f764acfad396b707c2ad4f348e5ad85c0ed187d0d6398c
3
+ size 78535