RicardoDominguez commited on
Commit
f3379d0
β€’
1 Parent(s): 432590f
Files changed (3) hide show
  1. README.md +1 -0
  2. app.py +3 -2
  3. src/display/utils.py +20 -14
README.md CHANGED
@@ -46,4 +46,5 @@ You'll find
46
 
47
  # Todo
48
 
 
49
  * Change background to white
 
46
 
47
  # Todo
48
 
49
+ * Change model types
50
  * Change background to white
app.py CHANGED
@@ -60,6 +60,7 @@ LEADERBOARD_DF = get_leaderboard_df(EVAL_RESULTS_PATH, EVAL_REQUESTS_PATH, COLS,
60
  def init_leaderboard(dataframe):
61
  if dataframe is None or dataframe.empty:
62
  raise ValueError("Leaderboard DataFrame is empty or None.")
 
63
  return Leaderboard(
64
  value=dataframe,
65
  datatype=[c.type for c in fields(AutoEvalColumn)],
@@ -68,7 +69,7 @@ def init_leaderboard(dataframe):
68
  cant_deselect=[c.name for c in fields(AutoEvalColumn) if c.never_hidden],
69
  label="Select columns to display:",
70
  ),
71
- # search_columns=[AutoEvalColumn.model.name, AutoEvalColumn.license.name],
72
  hide_columns=[c.name for c in fields(AutoEvalColumn) if c.hidden],
73
  filter_columns=[
74
  ColumnFilter(AutoEvalColumn.model_type.name, type="checkboxgroup", label="Model types"),
@@ -161,7 +162,7 @@ with demo:
161
  choices=[i.value.name for i in Precision if i != Precision.Unknown],
162
  label="Precision",
163
  multiselect=False,
164
- value="float16",
165
  interactive=True,
166
  )
167
  weight_type = gr.Dropdown(
 
60
  def init_leaderboard(dataframe):
61
  if dataframe is None or dataframe.empty:
62
  raise ValueError("Leaderboard DataFrame is empty or None.")
63
+
64
  return Leaderboard(
65
  value=dataframe,
66
  datatype=[c.type for c in fields(AutoEvalColumn)],
 
69
  cant_deselect=[c.name for c in fields(AutoEvalColumn) if c.never_hidden],
70
  label="Select columns to display:",
71
  ),
72
+ search_columns=[AutoEvalColumn.model.name],#, AutoEvalColumn.license.name],
73
  hide_columns=[c.name for c in fields(AutoEvalColumn) if c.hidden],
74
  filter_columns=[
75
  ColumnFilter(AutoEvalColumn.model_type.name, type="checkboxgroup", label="Model types"),
 
162
  choices=[i.value.name for i in Precision if i != Precision.Unknown],
163
  label="Precision",
164
  multiselect=False,
165
+ value="bfloat16",
166
  interactive=True,
167
  )
168
  weight_type = gr.Dropdown(
src/display/utils.py CHANGED
@@ -62,10 +62,12 @@ class ModelDetails:
62
 
63
 
64
  class ModelType(Enum):
65
- PT = ModelDetails(name="pretrained", symbol="🟒")
66
- FT = ModelDetails(name="fine-tuned", symbol="πŸ”Ά")
67
- IFT = ModelDetails(name="instruction-tuned", symbol="β­•")
68
- RL = ModelDetails(name="RL-tuned", symbol="🟦")
 
 
69
  Unknown = ModelDetails(name="", symbol="?")
70
 
71
  def to_str(self, separator=" "):
@@ -73,24 +75,28 @@ class ModelType(Enum):
73
 
74
  @staticmethod
75
  def from_str(type):
76
- if "fine-tuned" in type or "πŸ”Ά" in type:
77
- return ModelType.FT
78
- if "pretrained" in type or "🟒" in type:
79
- return ModelType.PT
80
- if "RL-tuned" in type or "🟦" in type:
81
- return ModelType.RL
82
- if "instruction-tuned" in type or "β­•" in type:
83
- return ModelType.IFT
 
 
 
 
84
  return ModelType.Unknown
85
 
86
  class WeightType(Enum):
87
- Adapter = ModelDetails("Adapter")
88
  Original = ModelDetails("Original")
 
89
  Delta = ModelDetails("Delta")
90
 
91
  class Precision(Enum):
92
- float16 = ModelDetails("float16")
93
  bfloat16 = ModelDetails("bfloat16")
 
94
  Unknown = ModelDetails("?")
95
 
96
  def from_str(precision):
 
62
 
63
 
64
  class ModelType(Enum):
65
+ # PT = ModelDetails(name="pretrained", symbol="🟒")
66
+ # FT = ModelDetails(name="fine-tuned", symbol="πŸ”Ά")
67
+ # IFT = ModelDetails(name="instruction-tuned", symbol="β­•")
68
+ # RL = ModelDetails(name="RL-tuned", symbol="🟦")
69
+ UNSP = ModelDetails(name="πŸ’¬ Unspecialized", symbol="πŸ’¬")
70
+ SP = ModelDetails(name="πŸ›οΈ Specialized", symbol="πŸ›οΈ")
71
  Unknown = ModelDetails(name="", symbol="?")
72
 
73
  def to_str(self, separator=" "):
 
75
 
76
  @staticmethod
77
  def from_str(type):
78
+ # if "fine-tuned" in type or "πŸ”Ά" in type:
79
+ # return ModelType.FT
80
+ # if "pretrained" in type or "🟒" in type:
81
+ # return ModelType.PT
82
+ # if "RL-tuned" in type or "🟦" in type:
83
+ # return ModelType.RL
84
+ # if "instruction-tuned" in type or "β­•" in type:
85
+ # return ModelType.IFT
86
+ if "Specialized" in type or "πŸ›οΈ" in type:
87
+ return ModelType.SP
88
+ if "Unspecialized" in type or "πŸ’¬" in type:
89
+ return ModelType.UNSP
90
  return ModelType.Unknown
91
 
92
  class WeightType(Enum):
 
93
  Original = ModelDetails("Original")
94
+ Adapter = ModelDetails("Adapter")
95
  Delta = ModelDetails("Delta")
96
 
97
  class Precision(Enum):
 
98
  bfloat16 = ModelDetails("bfloat16")
99
+ float16 = ModelDetails("float16")
100
  Unknown = ModelDetails("?")
101
 
102
  def from_str(precision):