Upload folder using huggingface_hub
Browse files- README.md +129 -3
- codemmlu.py +12 -11
README.md
CHANGED
@@ -1,3 +1,129 @@
|
|
1 |
-
---
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
dataset_info:
|
3 |
+
- config_name: api_frameworks
|
4 |
+
features:
|
5 |
+
- name: task_id
|
6 |
+
dtype: string
|
7 |
+
- name: question
|
8 |
+
dtype: string
|
9 |
+
- name: choices
|
10 |
+
sequence: string
|
11 |
+
splits:
|
12 |
+
- name: test
|
13 |
+
num_bytes: 12373682
|
14 |
+
num_examples: 19913
|
15 |
+
download_size: 2570062
|
16 |
+
dataset_size: 12373682
|
17 |
+
- config_name: code_completion
|
18 |
+
features:
|
19 |
+
- name: task_id
|
20 |
+
dtype: string
|
21 |
+
- name: question
|
22 |
+
dtype: string
|
23 |
+
- name: choices
|
24 |
+
sequence: string
|
25 |
+
splits:
|
26 |
+
- name: test
|
27 |
+
num_bytes: 12373682
|
28 |
+
num_examples: 19913
|
29 |
+
download_size: 2570062
|
30 |
+
dataset_size: 12373682
|
31 |
+
- config_name: code_repair
|
32 |
+
features:
|
33 |
+
- name: task_id
|
34 |
+
dtype: string
|
35 |
+
- name: question
|
36 |
+
dtype: string
|
37 |
+
- name: choices
|
38 |
+
sequence: string
|
39 |
+
splits:
|
40 |
+
- name: test
|
41 |
+
num_bytes: 12373682
|
42 |
+
num_examples: 19913
|
43 |
+
download_size: 2570062
|
44 |
+
dataset_size: 12373682
|
45 |
+
- config_name: dbms_sql
|
46 |
+
features:
|
47 |
+
- name: task_id
|
48 |
+
dtype: string
|
49 |
+
- name: question
|
50 |
+
dtype: string
|
51 |
+
- name: choices
|
52 |
+
sequence: string
|
53 |
+
splits:
|
54 |
+
- name: test
|
55 |
+
num_bytes: 12373682
|
56 |
+
num_examples: 19913
|
57 |
+
download_size: 2570062
|
58 |
+
dataset_size: 12373682
|
59 |
+
- config_name: defect_detection
|
60 |
+
features:
|
61 |
+
- name: task_id
|
62 |
+
dtype: string
|
63 |
+
- name: question
|
64 |
+
dtype: string
|
65 |
+
- name: choices
|
66 |
+
sequence: string
|
67 |
+
splits:
|
68 |
+
- name: test
|
69 |
+
num_bytes: 12373682
|
70 |
+
num_examples: 19913
|
71 |
+
download_size: 2570062
|
72 |
+
dataset_size: 12373682
|
73 |
+
- config_name: fill_in_the_middle
|
74 |
+
features:
|
75 |
+
- name: task_id
|
76 |
+
dtype: string
|
77 |
+
- name: question
|
78 |
+
dtype: string
|
79 |
+
- name: choices
|
80 |
+
sequence: string
|
81 |
+
splits:
|
82 |
+
- name: test
|
83 |
+
num_bytes: 12373682
|
84 |
+
num_examples: 19913
|
85 |
+
download_size: 2570062
|
86 |
+
dataset_size: 12373682
|
87 |
+
- config_name: others
|
88 |
+
features:
|
89 |
+
- name: task_id
|
90 |
+
dtype: string
|
91 |
+
- name: question
|
92 |
+
dtype: string
|
93 |
+
- name: choices
|
94 |
+
sequence: string
|
95 |
+
splits:
|
96 |
+
- name: test
|
97 |
+
num_bytes: 12373682
|
98 |
+
num_examples: 19913
|
99 |
+
download_size: 2570062
|
100 |
+
dataset_size: 12373682
|
101 |
+
- config_name: programming_syntax
|
102 |
+
features:
|
103 |
+
- name: task_id
|
104 |
+
dtype: string
|
105 |
+
- name: question
|
106 |
+
dtype: string
|
107 |
+
- name: choices
|
108 |
+
sequence: string
|
109 |
+
splits:
|
110 |
+
- name: test
|
111 |
+
num_bytes: 12373682
|
112 |
+
num_examples: 19913
|
113 |
+
download_size: 2570062
|
114 |
+
dataset_size: 12373682
|
115 |
+
- config_name: software_principles
|
116 |
+
features:
|
117 |
+
- name: task_id
|
118 |
+
dtype: string
|
119 |
+
- name: question
|
120 |
+
dtype: string
|
121 |
+
- name: choices
|
122 |
+
sequence: string
|
123 |
+
splits:
|
124 |
+
- name: test
|
125 |
+
num_bytes: 12373682
|
126 |
+
num_examples: 19913
|
127 |
+
download_size: 2570062
|
128 |
+
dataset_size: 12373682
|
129 |
+
---
|
codemmlu.py
CHANGED
@@ -88,17 +88,18 @@ class CodeMMLU(datasets.GeneratorBasedBuilder):
|
|
88 |
def _generate_examples(self, iter_archive):
|
89 |
"""This function returns the examples in the raw (text) form."""
|
90 |
for path, file in iter_archive:
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
|
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
|
101 |
-
|
102 |
-
|
103 |
|
104 |
-
|
|
|
88 |
def _generate_examples(self, iter_archive):
|
89 |
"""This function returns the examples in the raw (text) form."""
|
90 |
for path, file in iter_archive:
|
91 |
+
if path.endswith(".jsonl"):
|
92 |
+
lines = (line.decode("utf-8") for line in file)
|
93 |
+
reader = [json.loads(line) for line in lines]
|
94 |
+
for data in reader:
|
95 |
+
id_ = data['task_id']
|
96 |
|
97 |
+
return_dict = {
|
98 |
+
"question": data['question'],
|
99 |
+
"choices": data['choices'],
|
100 |
+
}
|
101 |
|
102 |
+
if "fill_in_the_middle" in path:
|
103 |
+
return_dict['problem_description'] = data['problem_description']
|
104 |
|
105 |
+
yield id_, return_dict
|