Update yall.py
Browse files
yall.py
CHANGED
@@ -96,19 +96,29 @@ def create_yall():
|
|
96 |
else:
|
97 |
model_name = model_id = 'Unknown'
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
# Create a GistInfo object and add it to the list
|
100 |
gist_info = GistInfo(
|
101 |
gist_id=data_dict['id'],
|
102 |
filename=filename,
|
103 |
-
url=data_dict['html_url'],
|
104 |
model_name=model_name,
|
105 |
model_id=model_id,
|
106 |
model=values[0].strip(),
|
107 |
-
agieval=
|
108 |
-
gpt4all=
|
109 |
truthfulqa=float(values[3].strip()),
|
110 |
-
bigbench=
|
111 |
-
average=
|
112 |
)
|
113 |
gist_infos.append(gist_info)
|
114 |
|
|
|
96 |
else:
|
97 |
model_name = model_id = 'Unknown'
|
98 |
|
99 |
+
# Calculate the average
|
100 |
+
try:
|
101 |
+
agieval = float(values[1].strip())
|
102 |
+
gpt4all = float(values[2].strip())
|
103 |
+
bigbench = float(values[4].strip())
|
104 |
+
average = (agieval + gpt4all + bigbench) / 3
|
105 |
+
except (ValueError, IndexError) as e:
|
106 |
+
print(f"Error processing values: {e}")
|
107 |
+
continue
|
108 |
+
|
109 |
# Create a GistInfo object and add it to the list
|
110 |
gist_info = GistInfo(
|
111 |
gist_id=data_dict['id'],
|
112 |
filename=filename,
|
113 |
+
url=data_dict['html_url'],
|
114 |
model_name=model_name,
|
115 |
model_id=model_id,
|
116 |
model=values[0].strip(),
|
117 |
+
agieval=agieval,
|
118 |
+
gpt4all=gpt4all,
|
119 |
truthfulqa=float(values[3].strip()),
|
120 |
+
bigbench=bigbench,
|
121 |
+
average=average,
|
122 |
)
|
123 |
gist_infos.append(gist_info)
|
124 |
|