update utils
Browse files- src/display/utils.py +4 -4
src/display/utils.py
CHANGED
@@ -13,7 +13,7 @@ class ColumnContent:
|
|
13 |
label: str
|
14 |
description: str
|
15 |
hidden: bool = False
|
16 |
-
displayed_by_default: bool = True
|
17 |
never_hidden: bool = False
|
18 |
|
19 |
# Initialize the list of columns for the leaderboard
|
@@ -22,7 +22,7 @@ COLUMNS: List[ColumnContent] = []
|
|
22 |
# Essential columns
|
23 |
COLUMNS.append(
|
24 |
ColumnContent(
|
25 |
-
name="
|
26 |
type=str,
|
27 |
label="Model",
|
28 |
description="Model name",
|
@@ -96,7 +96,7 @@ COLUMNS.extend([
|
|
96 |
),
|
97 |
])
|
98 |
|
99 |
-
#
|
100 |
COLS = [col.name for col in COLUMNS]
|
101 |
BENCHMARK_COLS = [col.name for col in COLUMNS if col.name not in [
|
102 |
"model", "average", "model_type", "weight_type", "precision", "license", "likes", "still_on_hub"
|
@@ -199,4 +199,4 @@ class Precision(Enum):
|
|
199 |
return Precision.float16
|
200 |
if precision_str in ["torch.bfloat16", "bfloat16"]:
|
201 |
return Precision.bfloat16
|
202 |
-
return Precision.Unknown
|
|
|
13 |
label: str
|
14 |
description: str
|
15 |
hidden: bool = False
|
16 |
+
displayed_by_default: bool = True
|
17 |
never_hidden: bool = False
|
18 |
|
19 |
# Initialize the list of columns for the leaderboard
|
|
|
22 |
# Essential columns
|
23 |
COLUMNS.append(
|
24 |
ColumnContent(
|
25 |
+
name="model", # Ensure this matches the DataFrame's 'model' column
|
26 |
type=str,
|
27 |
label="Model",
|
28 |
description="Model name",
|
|
|
96 |
),
|
97 |
])
|
98 |
|
99 |
+
# Create lists of column names for use in the application
|
100 |
COLS = [col.name for col in COLUMNS]
|
101 |
BENCHMARK_COLS = [col.name for col in COLUMNS if col.name not in [
|
102 |
"model", "average", "model_type", "weight_type", "precision", "license", "likes", "still_on_hub"
|
|
|
199 |
return Precision.float16
|
200 |
if precision_str in ["torch.bfloat16", "bfloat16"]:
|
201 |
return Precision.bfloat16
|
202 |
+
return Precision.Unknown
|