Madhavan Iyengar
commited on
Commit
•
3a99aac
1
Parent(s):
b09d195
keep only relevant params
Browse files- app.py +5 -5
- src/display/utils.py +3 -3
app.py
CHANGED
@@ -85,8 +85,8 @@ def update_table(
|
|
85 |
show_deleted: bool,
|
86 |
query: str,
|
87 |
):
|
88 |
-
filtered_df = filter_models(hidden_df, type_query, size_query, precision_query, show_deleted)
|
89 |
-
filtered_df = filter_queries(query,
|
90 |
df = select_columns(filtered_df, columns)
|
91 |
return df
|
92 |
|
@@ -97,7 +97,7 @@ def search_table(df: pd.DataFrame, query: str) -> pd.DataFrame:
|
|
97 |
|
98 |
def select_columns(df: pd.DataFrame, columns: list) -> pd.DataFrame:
|
99 |
always_here_cols = [
|
100 |
-
|
101 |
AutoEvalColumn.model.name,
|
102 |
]
|
103 |
# We use COLS to maintain sorting
|
@@ -138,8 +138,8 @@ def filter_models(
|
|
138 |
filtered_df = df
|
139 |
|
140 |
type_emoji = [t[0] for t in type_query]
|
141 |
-
filtered_df = filtered_df.loc[df[AutoEvalColumn.model_type_symbol.name].isin(type_emoji)]
|
142 |
-
filtered_df = filtered_df.loc[df[AutoEvalColumn.precision.name].isin(precision_query + ["None"])]
|
143 |
|
144 |
numeric_interval = pd.IntervalIndex(sorted([NUMERIC_INTERVALS[s] for s in size_query]))
|
145 |
params_column = pd.to_numeric(df[AutoEvalColumn.params.name], errors="coerce")
|
|
|
85 |
show_deleted: bool,
|
86 |
query: str,
|
87 |
):
|
88 |
+
# filtered_df = filter_models(hidden_df, type_query, size_query, precision_query, show_deleted)
|
89 |
+
filtered_df = filter_queries(query, hidden_df)
|
90 |
df = select_columns(filtered_df, columns)
|
91 |
return df
|
92 |
|
|
|
97 |
|
98 |
def select_columns(df: pd.DataFrame, columns: list) -> pd.DataFrame:
|
99 |
always_here_cols = [
|
100 |
+
# AutoEvalColumn.model_type_symbol.name,
|
101 |
AutoEvalColumn.model.name,
|
102 |
]
|
103 |
# We use COLS to maintain sorting
|
|
|
138 |
filtered_df = df
|
139 |
|
140 |
type_emoji = [t[0] for t in type_query]
|
141 |
+
# filtered_df = filtered_df.loc[df[AutoEvalColumn.model_type_symbol.name].isin(type_emoji)]
|
142 |
+
# filtered_df = filtered_df.loc[df[AutoEvalColumn.precision.name].isin(precision_query + ["None"])]
|
143 |
|
144 |
numeric_interval = pd.IntervalIndex(sorted([NUMERIC_INTERVALS[s] for s in size_query]))
|
145 |
params_column = pd.to_numeric(df[AutoEvalColumn.params.name], errors="coerce")
|
src/display/utils.py
CHANGED
@@ -25,7 +25,7 @@ class ColumnContent:
|
|
25 |
## Leaderboard columns
|
26 |
auto_eval_column_dict = []
|
27 |
# Init
|
28 |
-
auto_eval_column_dict.append(["model_type_symbol", ColumnContent, ColumnContent("T", "str",
|
29 |
auto_eval_column_dict.append(["model", ColumnContent, ColumnContent("Model", "markdown", True, never_hidden=True)])
|
30 |
#Scores
|
31 |
# auto_eval_column_dict.append(["average", ColumnContent, ColumnContent("Average ⬆️", "number", True)])
|
@@ -35,9 +35,9 @@ for task in Tasks:
|
|
35 |
auto_eval_column_dict.append(["model_type", ColumnContent, ColumnContent("Type", "str", False, True)])
|
36 |
auto_eval_column_dict.append(["architecture", ColumnContent, ColumnContent("Architecture", "str", False, True)])
|
37 |
auto_eval_column_dict.append(["weight_type", ColumnContent, ColumnContent("Weight type", "str", False, True)])
|
38 |
-
auto_eval_column_dict.append(["precision", ColumnContent, ColumnContent("Precision", "str", True)])
|
39 |
auto_eval_column_dict.append(["license", ColumnContent, ColumnContent("Hub License", "str", False, True)])
|
40 |
-
auto_eval_column_dict.append(["params", ColumnContent, ColumnContent("#Params (B)", "number", True)])
|
41 |
auto_eval_column_dict.append(["likes", ColumnContent, ColumnContent("Hub ❤️", "number", False, True)])
|
42 |
auto_eval_column_dict.append(["still_on_hub", ColumnContent, ColumnContent("Available on the hub", "bool", False, True)])
|
43 |
auto_eval_column_dict.append(["revision", ColumnContent, ColumnContent("Model sha", "str", False, True)])
|
|
|
25 |
## Leaderboard columns
|
26 |
auto_eval_column_dict = []
|
27 |
# Init
|
28 |
+
auto_eval_column_dict.append(["model_type_symbol", ColumnContent, ColumnContent("T", "str", False, hidden=True)])
|
29 |
auto_eval_column_dict.append(["model", ColumnContent, ColumnContent("Model", "markdown", True, never_hidden=True)])
|
30 |
#Scores
|
31 |
# auto_eval_column_dict.append(["average", ColumnContent, ColumnContent("Average ⬆️", "number", True)])
|
|
|
35 |
auto_eval_column_dict.append(["model_type", ColumnContent, ColumnContent("Type", "str", False, True)])
|
36 |
auto_eval_column_dict.append(["architecture", ColumnContent, ColumnContent("Architecture", "str", False, True)])
|
37 |
auto_eval_column_dict.append(["weight_type", ColumnContent, ColumnContent("Weight type", "str", False, True)])
|
38 |
+
auto_eval_column_dict.append(["precision", ColumnContent, ColumnContent("Precision", "str", False, True)])
|
39 |
auto_eval_column_dict.append(["license", ColumnContent, ColumnContent("Hub License", "str", False, True)])
|
40 |
+
auto_eval_column_dict.append(["params", ColumnContent, ColumnContent("#Params (B)", "number", False, True)])
|
41 |
auto_eval_column_dict.append(["likes", ColumnContent, ColumnContent("Hub ❤️", "number", False, True)])
|
42 |
auto_eval_column_dict.append(["still_on_hub", ColumnContent, ColumnContent("Available on the hub", "bool", False, True)])
|
43 |
auto_eval_column_dict.append(["revision", ColumnContent, ColumnContent("Model sha", "str", False, True)])
|