Upload folder using huggingface_hub
Browse files- codemmlu.py +16 -13
codemmlu.py
CHANGED
@@ -58,23 +58,26 @@ class CodeMMLUConfig(datasets.BuilderConfig):
|
|
58 |
self.features = features
|
59 |
self.data_url = data_url
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
class CodeMMLU(datasets.GeneratorBasedBuilder):
|
63 |
"""CodeMMLU: A Multi-Task Benchmark for Assessing Code Understanding Capabilities"""
|
64 |
BUILDER_CONFIG_CLASS = CodeMMLUConfig
|
65 |
-
BUILDER_CONFIGS =
|
66 |
-
|
67 |
-
|
68 |
-
if sub == "fill_in_the_middle":
|
69 |
-
features.append('problem_description')
|
70 |
-
|
71 |
-
BUILDER_CONFIGS.append(CodeMMLUConfig(
|
72 |
-
name=sub,
|
73 |
-
features=features,
|
74 |
-
data_url=os.path.join(_URL, sub + ".jsonl"),
|
75 |
-
description="CodeMMLU test subject {}".format(sub),
|
76 |
-
))
|
77 |
-
|
78 |
|
79 |
def _info(self):
|
80 |
features = datasets.Features(
|
|
|
58 |
self.features = features
|
59 |
self.data_url = data_url
|
60 |
|
61 |
+
CONFIGS = []
|
62 |
+
for sub in _SUBJECTS:
|
63 |
+
features = ['task_id', 'question', 'choices']
|
64 |
+
if sub == "fill_in_the_middle":
|
65 |
+
features.append('problem_description')
|
66 |
+
|
67 |
+
CONFIGS.append(CodeMMLUConfig(
|
68 |
+
name=sub,
|
69 |
+
features=features,
|
70 |
+
data_url=os.path.join(_URL, sub + ".jsonl"),
|
71 |
+
description="CodeMMLU test subject {}".format(sub),
|
72 |
+
))
|
73 |
+
|
74 |
|
75 |
class CodeMMLU(datasets.GeneratorBasedBuilder):
|
76 |
"""CodeMMLU: A Multi-Task Benchmark for Assessing Code Understanding Capabilities"""
|
77 |
BUILDER_CONFIG_CLASS = CodeMMLUConfig
|
78 |
+
BUILDER_CONFIGS = CONFIGS
|
79 |
+
DEFAULT_CONFIG_NAME = "programming_syntax"
|
80 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
def _info(self):
|
83 |
features = datasets.Features(
|