Update src/display/utils.py
Browse files- src/display/utils.py +23 -23
src/display/utils.py
CHANGED
|
@@ -26,19 +26,19 @@ auto_eval_column_dict = []
|
|
| 26 |
auto_eval_column_dict.append(["model_type_symbol", ColumnContent, ColumnContent("T", "str", True, never_hidden=True)])
|
| 27 |
auto_eval_column_dict.append(["model", ColumnContent, ColumnContent("Model", "markdown", True, never_hidden=True)])
|
| 28 |
#Scores
|
| 29 |
-
auto_eval_column_dict.append(["average", ColumnContent, ColumnContent("Average ⬆️", "number", True)])
|
| 30 |
-
for task in Tasks:
|
| 31 |
-
auto_eval_column_dict.append([task.name, ColumnContent, ColumnContent(task.value.col_name, "number", True)])
|
| 32 |
# Model information
|
| 33 |
auto_eval_column_dict.append(["model_type", ColumnContent, ColumnContent("Type", "str", False)])
|
| 34 |
-
auto_eval_column_dict.append(["architecture", ColumnContent, ColumnContent("Architecture", "str", False)])
|
| 35 |
-
auto_eval_column_dict.append(["weight_type", ColumnContent, ColumnContent("Weight type", "str", False, True)])
|
| 36 |
-
auto_eval_column_dict.append(["precision", ColumnContent, ColumnContent("Precision", "str", False)])
|
| 37 |
-
auto_eval_column_dict.append(["license", ColumnContent, ColumnContent("Hub License", "str", False)])
|
| 38 |
-
auto_eval_column_dict.append(["params", ColumnContent, ColumnContent("#Params (B)", "number", False)])
|
| 39 |
-
auto_eval_column_dict.append(["likes", ColumnContent, ColumnContent("Hub ❤️", "number", False)])
|
| 40 |
-
auto_eval_column_dict.append(["still_on_hub", ColumnContent, ColumnContent("Available on the hub", "bool", False)])
|
| 41 |
-
auto_eval_column_dict.append(["revision", ColumnContent, ColumnContent("Model sha", "str", False, False)])
|
| 42 |
|
| 43 |
# We use make dataclass to dynamically fill the scores from Tasks
|
| 44 |
AutoEvalColumn = make_dataclass("AutoEvalColumn", auto_eval_column_dict, frozen=True)
|
|
@@ -62,10 +62,10 @@ class ModelDetails:
|
|
| 62 |
|
| 63 |
|
| 64 |
class ModelType(Enum):
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
Unknown = ModelDetails(name="", symbol="?")
|
| 70 |
|
| 71 |
def to_str(self, separator=" "):
|
|
@@ -73,14 +73,14 @@ class ModelType(Enum):
|
|
| 73 |
|
| 74 |
@staticmethod
|
| 75 |
def from_str(type):
|
| 76 |
-
if "
|
| 77 |
-
return ModelType.
|
| 78 |
-
if "
|
| 79 |
-
return ModelType.
|
| 80 |
-
if "
|
| 81 |
-
return ModelType.
|
| 82 |
-
if "
|
| 83 |
-
return ModelType.
|
| 84 |
return ModelType.Unknown
|
| 85 |
|
| 86 |
class WeightType(Enum):
|
|
|
|
| 26 |
auto_eval_column_dict.append(["model_type_symbol", ColumnContent, ColumnContent("T", "str", True, never_hidden=True)])
|
| 27 |
auto_eval_column_dict.append(["model", ColumnContent, ColumnContent("Model", "markdown", True, never_hidden=True)])
|
| 28 |
#Scores
|
| 29 |
+
#auto_eval_column_dict.append(["average", ColumnContent, ColumnContent("Average ⬆️", "number", True)])
|
| 30 |
+
#for task in Tasks:
|
| 31 |
+
# auto_eval_column_dict.append([task.name, ColumnContent, ColumnContent(task.value.col_name, "number", True)])
|
| 32 |
# Model information
|
| 33 |
auto_eval_column_dict.append(["model_type", ColumnContent, ColumnContent("Type", "str", False)])
|
| 34 |
+
#auto_eval_column_dict.append(["architecture", ColumnContent, ColumnContent("Architecture", "str", False)])
|
| 35 |
+
#auto_eval_column_dict.append(["weight_type", ColumnContent, ColumnContent("Weight type", "str", False, True)])
|
| 36 |
+
#auto_eval_column_dict.append(["precision", ColumnContent, ColumnContent("Precision", "str", False)])
|
| 37 |
+
#auto_eval_column_dict.append(["license", ColumnContent, ColumnContent("Hub License", "str", False)])
|
| 38 |
+
#auto_eval_column_dict.append(["params", ColumnContent, ColumnContent("#Params (B)", "number", False)])
|
| 39 |
+
#auto_eval_column_dict.append(["likes", ColumnContent, ColumnContent("Hub ❤️", "number", False)])
|
| 40 |
+
#auto_eval_column_dict.append(["still_on_hub", ColumnContent, ColumnContent("Available on the hub", "bool", False)])
|
| 41 |
+
#auto_eval_column_dict.append(["revision", ColumnContent, ColumnContent("Model sha", "str", False, False)])
|
| 42 |
|
| 43 |
# We use make dataclass to dynamically fill the scores from Tasks
|
| 44 |
AutoEvalColumn = make_dataclass("AutoEvalColumn", auto_eval_column_dict, frozen=True)
|
|
|
|
| 62 |
|
| 63 |
|
| 64 |
class ModelType(Enum):
|
| 65 |
+
OS_VLM = ModelDetails(name="open vision-language", symbol="🟢")
|
| 66 |
+
P_VLM = ModelDetails(name="proprietary vision-language", symbol="🔶")
|
| 67 |
+
TSFM = ModelDetails(name="time-series FM", symbol="⭕")
|
| 68 |
+
R = ModelDetails(name="reasoning", symbol="🟦")
|
| 69 |
Unknown = ModelDetails(name="", symbol="?")
|
| 70 |
|
| 71 |
def to_str(self, separator=" "):
|
|
|
|
| 73 |
|
| 74 |
@staticmethod
|
| 75 |
def from_str(type):
|
| 76 |
+
if "proprietary vision-language" in type or "🔶" in type:
|
| 77 |
+
return ModelType.P_VLM
|
| 78 |
+
if "open vision-language" in type or "🟢" in type:
|
| 79 |
+
return ModelType.OS_VLM
|
| 80 |
+
if "reasoning" in type or "🟦" in type:
|
| 81 |
+
return ModelType.R
|
| 82 |
+
if "time-series FM" in type or "⭕" in type:
|
| 83 |
+
return ModelType.TSFM
|
| 84 |
return ModelType.Unknown
|
| 85 |
|
| 86 |
class WeightType(Enum):
|