gabeorlanski
commited on
Commit
•
62083ad
1
Parent(s):
50d0ca2
Update bc-mbpp.py
Browse files- bc-mbpp.py +4 -9
bc-mbpp.py
CHANGED
@@ -46,9 +46,6 @@ _LICENSE = "CC-BY-4.0"
|
|
46 |
|
47 |
_VERSION = "1.0.0"
|
48 |
|
49 |
-
_KEYS_REMOVE = {
|
50 |
-
"header"
|
51 |
-
}
|
52 |
|
53 |
class BCMBPP(datasets.GeneratorBasedBuilder):
|
54 |
"""BC-MBPP"""
|
@@ -85,7 +82,9 @@ class BCMBPP(datasets.GeneratorBasedBuilder):
|
|
85 |
"entry_fn_name": datasets.Value("string"),
|
86 |
"entry_cls_name": datasets.Value("string"),
|
87 |
"test_code": datasets.Value("string"),
|
88 |
-
"solution":datasets.Value("string")
|
|
|
|
|
89 |
}
|
90 |
)
|
91 |
description = _DESCRIPTION
|
@@ -147,12 +146,8 @@ class BCMBPP(datasets.GeneratorBasedBuilder):
|
|
147 |
idx = int(d['title'].split('/')[-1])
|
148 |
if not (idx_range[0] <= idx <= idx_range[1]):
|
149 |
continue
|
150 |
-
|
151 |
d['solution'] = d.pop('solution_python')
|
152 |
-
for k in _KEYS_REMOVE:
|
153 |
-
d.pop(k)
|
154 |
yield id_, d
|
155 |
id_+=1
|
156 |
-
|
157 |
-
|
158 |
|
|
|
46 |
|
47 |
_VERSION = "1.0.0"
|
48 |
|
|
|
|
|
|
|
49 |
|
50 |
class BCMBPP(datasets.GeneratorBasedBuilder):
|
51 |
"""BC-MBPP"""
|
|
|
82 |
"entry_fn_name": datasets.Value("string"),
|
83 |
"entry_cls_name": datasets.Value("string"),
|
84 |
"test_code": datasets.Value("string"),
|
85 |
+
"solution":datasets.Value("string"),
|
86 |
+
"test_list": datasets.Value("string"),
|
87 |
+
"test_case_ids":datasets.Sequence(datasets.Value("string"))
|
88 |
}
|
89 |
)
|
90 |
description = _DESCRIPTION
|
|
|
146 |
idx = int(d['title'].split('/')[-1])
|
147 |
if not (idx_range[0] <= idx <= idx_range[1]):
|
148 |
continue
|
149 |
+
d['test_list'] = json.dumps(d['test_list'])
|
150 |
d['solution'] = d.pop('solution_python')
|
|
|
|
|
151 |
yield id_, d
|
152 |
id_+=1
|
|
|
|
|
153 |
|