Spaces:
Running
Running
update scripts
Browse files- src/display/about.py +2 -2
- src/leaderboard/load_results.py +21 -18
src/display/about.py
CHANGED
@@ -20,8 +20,8 @@ TITLE = """<h1 align="center" id="space-title">SeaExam Leaderboard</h1>"""
|
|
20 |
|
21 |
# What does your leaderboard evaluate?
|
22 |
INTRODUCTION_TEXT = """
|
23 |
-
🟢:
|
24 |
-
🔶:
|
25 |
"""
|
26 |
|
27 |
# Which evaluations are you running? how can people reproduce what you have?
|
|
|
20 |
|
21 |
# What does your leaderboard evaluate?
|
22 |
INTRODUCTION_TEXT = """
|
23 |
+
🟢: base
|
24 |
+
🔶: chat
|
25 |
"""
|
26 |
|
27 |
# Which evaluations are you running? how can people reproduce what you have?
|
src/leaderboard/load_results.py
CHANGED
@@ -4,6 +4,8 @@ def load_data(data_path):
|
|
4 |
df = pd.read_csv(data_path, skiprows=1, header=0).dropna()
|
5 |
|
6 |
columns = ['Model', 'type', 'open?', 'shot', 'en', 'zh', 'id', 'th', 'vi', 'avg', 'avg_sea']
|
|
|
|
|
7 |
|
8 |
# Splitting into three separate DataFrames based on the groups M3Exam and MMLU and average
|
9 |
df_m3exam = df.iloc[:, :11] # M3Exam columns
|
@@ -17,22 +19,23 @@ def load_data(data_path):
|
|
17 |
df_tmp[['en', 'zh', 'id', 'th', 'vi', 'avg', 'avg_sea']] *= 100
|
18 |
df_tmp[['en', 'zh', 'id', 'th', 'vi', 'avg', 'avg_sea']] = df_tmp[['en', 'zh', 'id', 'th', 'vi', 'avg', 'avg_sea']].round(2)
|
19 |
df_tmp['rank'] = df_tmp['avg'].rank(ascending=False).astype(int)
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
38 |
return df_m3exam, df_mmlu, df_avg
|
|
|
4 |
df = pd.read_csv(data_path, skiprows=1, header=0).dropna()
|
5 |
|
6 |
columns = ['Model', 'type', 'open?', 'shot', 'en', 'zh', 'id', 'th', 'vi', 'avg', 'avg_sea']
|
7 |
+
columns_sorted = ['rank','type', 'Model', 'open?', 'shot', 'avg', 'avg_sea', 'en', 'zh', 'id', 'th', 'vi']
|
8 |
+
|
9 |
|
10 |
# Splitting into three separate DataFrames based on the groups M3Exam and MMLU and average
|
11 |
df_m3exam = df.iloc[:, :11] # M3Exam columns
|
|
|
19 |
df_tmp[['en', 'zh', 'id', 'th', 'vi', 'avg', 'avg_sea']] *= 100
|
20 |
df_tmp[['en', 'zh', 'id', 'th', 'vi', 'avg', 'avg_sea']] = df_tmp[['en', 'zh', 'id', 'th', 'vi', 'avg', 'avg_sea']].round(2)
|
21 |
df_tmp['rank'] = df_tmp['avg'].rank(ascending=False).astype(int)
|
22 |
+
|
23 |
+
df_tmp = df_tmp[columns_sorted].sort_values(by='avg_sea', ascending=False)
|
24 |
+
df_tmp = df_tmp.rename(columns={'avg_sea': 'avg_sea⬆️'})
|
25 |
+
df_tmp['type'] = df_tmp['type'].map({'base': '🟢', 'chat': '🔶'})
|
26 |
+
|
27 |
+
# df_m3exam = df_m3exam[columns_sorted].sort_values(by='avg_sea', ascending=False)
|
28 |
+
# df_mmlu = df_mmlu[columns_sorted].sort_values(by='avg', ascending=False)
|
29 |
+
# df_avg = df_avg[columns_sorted].sort_values(by='avg', ascending=False)
|
30 |
+
|
31 |
+
# # change the column name from 'avg' to 'avg⬆️'
|
32 |
+
# df_m3exam = df_m3exam.rename(columns={'avg': 'avg⬆️'})
|
33 |
+
# df_mmlu = df_mmlu.rename(columns={'avg': 'avg⬆️'})
|
34 |
+
# df_avg = df_avg.rename(columns={'avg': 'avg⬆️'})
|
35 |
+
|
36 |
+
# # map the values in the 'type' column to the following values: {'base': 'Base', 'chat': 'Chat'}
|
37 |
+
# df_m3exam['type'] = df_m3exam['type'].map({'base': '🟢', 'chat': '🔶'})
|
38 |
+
# df_mmlu['type'] = df_mmlu['type'].map({'base': '🟢', 'chat': '🔶'})
|
39 |
+
# df_avg['type'] = df_avg['type'].map({'base': '🟢', 'chat': '🔶'})
|
40 |
+
|
41 |
return df_m3exam, df_mmlu, df_avg
|