Spaces:
Runtime error
Runtime error
n-shot filter
Browse files- app.py +9 -1
- src/display/utils.py +5 -1
app.py
CHANGED
@@ -24,7 +24,8 @@ from src.display.utils import (
|
|
24 |
ModelType,
|
25 |
fields,
|
26 |
WeightType,
|
27 |
-
Precision
|
|
|
28 |
)
|
29 |
from src.envs import API, DEVICE, EVAL_REQUESTS_PATH, EVAL_RESULTS_PATH, QUEUE_REPO, REPO_ID, RESULTS_REPO, TOKEN
|
30 |
from src.populate import get_evaluation_queue_df, get_leaderboard_df
|
@@ -199,6 +200,13 @@ with demo:
|
|
199 |
interactive=True,
|
200 |
elem_id="filter-columns-size",
|
201 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
|
203 |
leaderboard_table = gr.components.Dataframe(
|
204 |
value=leaderboard_df[
|
|
|
24 |
ModelType,
|
25 |
fields,
|
26 |
WeightType,
|
27 |
+
Precision,
|
28 |
+
NShotType,
|
29 |
)
|
30 |
from src.envs import API, DEVICE, EVAL_REQUESTS_PATH, EVAL_RESULTS_PATH, QUEUE_REPO, REPO_ID, RESULTS_REPO, TOKEN
|
31 |
from src.populate import get_evaluation_queue_df, get_leaderboard_df
|
|
|
200 |
interactive=True,
|
201 |
elem_id="filter-columns-size",
|
202 |
)
|
203 |
+
filter_columns_nshot = gr.CheckboxGroup(
|
204 |
+
label="N-shot",
|
205 |
+
choices=[i.value.name for i in NShotType],
|
206 |
+
value=[i.value.name for i in NShotType],
|
207 |
+
interactive=True,
|
208 |
+
elem_id="filter-columns-nshot",
|
209 |
+
)
|
210 |
|
211 |
leaderboard_table = gr.components.Dataframe(
|
212 |
value=leaderboard_df[
|
src/display/utils.py
CHANGED
@@ -26,6 +26,7 @@ auto_eval_column_dict = []
|
|
26 |
# Init
|
27 |
auto_eval_column_dict.append(["model_type_symbol", ColumnContent, ColumnContent("T", "str", True, never_hidden=True)])
|
28 |
auto_eval_column_dict.append(["model", ColumnContent, ColumnContent("Model", "markdown", True, never_hidden=True)])
|
|
|
29 |
#Scores
|
30 |
auto_eval_column_dict.append(["average", ColumnContent, ColumnContent("Average ⬆️", "number", True)])
|
31 |
for task in Tasks:
|
@@ -40,7 +41,6 @@ auto_eval_column_dict.append(["params", ColumnContent, ColumnContent("#Params (B
|
|
40 |
auto_eval_column_dict.append(["likes", ColumnContent, ColumnContent("Hub ❤️", "number", False)])
|
41 |
auto_eval_column_dict.append(["still_on_hub", ColumnContent, ColumnContent("Available on the hub", "bool", False)])
|
42 |
auto_eval_column_dict.append(["revision", ColumnContent, ColumnContent("Model sha", "str", False, False)])
|
43 |
-
auto_eval_column_dict.append(["n_shot", ColumnContent, ColumnContent("n_shot", "number", False)])
|
44 |
# Dummy column for the search bar (hidden by the custom CSS)
|
45 |
auto_eval_column_dict.append(["dummy", ColumnContent, ColumnContent("model_name_for_query", "str", False, dummy=True)])
|
46 |
|
@@ -92,6 +92,10 @@ class WeightType(Enum):
|
|
92 |
Original = ModelDetails("Original")
|
93 |
Delta = ModelDetails("Delta")
|
94 |
|
|
|
|
|
|
|
|
|
95 |
class Precision(Enum):
|
96 |
float16 = ModelDetails("float16")
|
97 |
bfloat16 = ModelDetails("bfloat16")
|
|
|
26 |
# Init
|
27 |
auto_eval_column_dict.append(["model_type_symbol", ColumnContent, ColumnContent("T", "str", True, never_hidden=True)])
|
28 |
auto_eval_column_dict.append(["model", ColumnContent, ColumnContent("Model", "markdown", True, never_hidden=True)])
|
29 |
+
auto_eval_column_dict.append(["n_shot", ColumnContent, ColumnContent("n_shot", "number", True)])
|
30 |
#Scores
|
31 |
auto_eval_column_dict.append(["average", ColumnContent, ColumnContent("Average ⬆️", "number", True)])
|
32 |
for task in Tasks:
|
|
|
41 |
auto_eval_column_dict.append(["likes", ColumnContent, ColumnContent("Hub ❤️", "number", False)])
|
42 |
auto_eval_column_dict.append(["still_on_hub", ColumnContent, ColumnContent("Available on the hub", "bool", False)])
|
43 |
auto_eval_column_dict.append(["revision", ColumnContent, ColumnContent("Model sha", "str", False, False)])
|
|
|
44 |
# Dummy column for the search bar (hidden by the custom CSS)
|
45 |
auto_eval_column_dict.append(["dummy", ColumnContent, ColumnContent("model_name_for_query", "str", False, dummy=True)])
|
46 |
|
|
|
92 |
Original = ModelDetails("Original")
|
93 |
Delta = ModelDetails("Delta")
|
94 |
|
95 |
+
class NShotType(Enum):
|
96 |
+
n0 = ModelDetails("0")
|
97 |
+
n5 = ModelDetails("5")
|
98 |
+
|
99 |
class Precision(Enum):
|
100 |
float16 = ModelDetails("float16")
|
101 |
bfloat16 = ModelDetails("bfloat16")
|