Datasets:
Tasks:
Text2Text Generation
Modalities:
Text
Formats:
parquet
Languages:
English
Size:
< 1K
ArXiv:
Tags:
code-generation
License:
FudanSELab
commited on
Commit
•
599abd4
1
Parent(s):
291ed0e
Update ClassEval.py
Browse files- ClassEval.py +28 -14
ClassEval.py
CHANGED
@@ -89,17 +89,31 @@ class ClassEval(datasets.GeneratorBasedBuilder):
|
|
89 |
with open(filepath, encoding = 'utf-8') as f:
|
90 |
cont = json.load(f)
|
91 |
for row in cont:
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
with open(filepath, encoding = 'utf-8') as f:
|
90 |
cont = json.load(f)
|
91 |
for row in cont:
|
92 |
+
for method_info in row["methods_info"]:
|
93 |
+
for dependency in method_info["dependencies"]:
|
94 |
+
yield key, {
|
95 |
+
"task_id": row["task_id"],
|
96 |
+
"skeleton": row["skeleton"],
|
97 |
+
"test": row["test"],
|
98 |
+
"solution_code": row["solution_code"],
|
99 |
+
"import_statement": row["import_statement"],
|
100 |
+
"class_description": row["class_description"],
|
101 |
+
"class_name": row["class_name"],
|
102 |
+
"test_classes": row["test_classes"],
|
103 |
+
"class_constructor": row["class_constructor"],
|
104 |
+
"fields": row["fields"],
|
105 |
+
"methods_info": {
|
106 |
+
"method_name": method_info["method_name"],
|
107 |
+
"method_description": method_info["method_description"],
|
108 |
+
"test_class": method_info["test_class"],
|
109 |
+
"test_code": method_info["test_code"],
|
110 |
+
"solution_code": method_info["solution_code"],
|
111 |
+
"dependencies": {
|
112 |
+
"Standalone": dependency["Standalone"],
|
113 |
+
"lib_dependencies": dependency["lib_dependencies"],
|
114 |
+
"field_dependencies": dependency["field_dependencies"],
|
115 |
+
"method_dependencies": dependency["method_dependencies"],
|
116 |
+
},
|
117 |
+
},
|
118 |
+
}
|
119 |
+
key += 1
|