Adam Jirkovsky
commited on
Commit
·
83a0ab6
1
Parent(s):
f7e666c
Rename model link column
Browse files- src/display/utils.py +1 -1
- src/populate.py +8 -1
src/display/utils.py
CHANGED
@@ -50,7 +50,7 @@ auto_eval_column_dict.append(["dummy", ColumnContent, ColumnContent("model_name_
|
|
50 |
|
51 |
auto_eval_column_dict.append(["eval_name", ColumnContent, ColumnContent("Model", "markdown", True, never_hidden=True)])
|
52 |
auto_eval_column_dict.append(["precision", ColumnContent, ColumnContent("Precision", "str", True)])
|
53 |
-
auto_eval_column_dict.append(["hf_model_id", ColumnContent, ColumnContent("Model
|
54 |
auto_eval_column_dict.append(["agree_cs", ColumnContent, ColumnContent("AGREE", "number", True)])
|
55 |
auto_eval_column_dict.append(["anli_cs", ColumnContent, ColumnContent("ANLI", "number", True)])
|
56 |
auto_eval_column_dict.append(["arc_challenge_cs", ColumnContent, ColumnContent("ARC-Challenge", "number", True)])
|
|
|
50 |
|
51 |
auto_eval_column_dict.append(["eval_name", ColumnContent, ColumnContent("Model", "markdown", True, never_hidden=True)])
|
52 |
auto_eval_column_dict.append(["precision", ColumnContent, ColumnContent("Precision", "str", True)])
|
53 |
+
auto_eval_column_dict.append(["hf_model_id", ColumnContent, ColumnContent("Model URL", "str", False)])
|
54 |
auto_eval_column_dict.append(["agree_cs", ColumnContent, ColumnContent("AGREE", "number", True)])
|
55 |
auto_eval_column_dict.append(["anli_cs", ColumnContent, ColumnContent("ANLI", "number", True)])
|
56 |
auto_eval_column_dict.append(["arc_challenge_cs", ColumnContent, ColumnContent("ARC-Challenge", "number", True)])
|
src/populate.py
CHANGED
@@ -9,6 +9,13 @@ from src.display.utils import AutoEvalColumn, EvalQueueColumn, HEADER_MAP
|
|
9 |
from src.leaderboard.read_evals import get_raw_eval_results
|
10 |
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchmark_cols: list) -> pd.DataFrame:
|
13 |
raw_data = get_raw_eval_results(results_path, requests_path)
|
14 |
#all_data_json = [v.to_dict() for v in raw_data]
|
@@ -19,7 +26,7 @@ def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchm
|
|
19 |
df.replace(r'\s+', np.nan, regex=True)
|
20 |
# filter out if any of the benchmarks have not been produced
|
21 |
df = df[has_no_nan_values(df, benchmark_cols)]
|
22 |
-
df['Model'] = df.apply(
|
23 |
|
24 |
return raw_data, df
|
25 |
|
|
|
9 |
from src.leaderboard.read_evals import get_raw_eval_results
|
10 |
|
11 |
|
12 |
+
def add_model_hyperlinks(row):
|
13 |
+
if row["Model URL"] is None or row["Model URL"] == "":
|
14 |
+
return row["Model"]
|
15 |
+
else:
|
16 |
+
return model_hyperlink(row["Model URL"], row["Model"])
|
17 |
+
|
18 |
+
|
19 |
def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchmark_cols: list) -> pd.DataFrame:
|
20 |
raw_data = get_raw_eval_results(results_path, requests_path)
|
21 |
#all_data_json = [v.to_dict() for v in raw_data]
|
|
|
26 |
df.replace(r'\s+', np.nan, regex=True)
|
27 |
# filter out if any of the benchmarks have not been produced
|
28 |
df = df[has_no_nan_values(df, benchmark_cols)]
|
29 |
+
df['Model'] = df.apply(add_model_hyperlinks, axis=1)
|
30 |
|
31 |
return raw_data, df
|
32 |
|