Jellyfish042 commited on
Commit
ed92462
1 Parent(s): 86e1422
Files changed (2) hide show
  1. app.py +30 -3
  2. data/2024-05/7b.xlsx +0 -0
app.py CHANGED
@@ -120,6 +120,7 @@ def get_folders_matching_format(directory):
120
 
121
 
122
  def get_unique_column_names(all_data):
 
123
  # column_names = {}
124
  #
125
  # for folder_name, files in all_data.items():
@@ -178,10 +179,36 @@ def update_table(period: str,
178
  if 'Individual Tests' in color_columns:
179
  target_color_columns.extend([col for col in filtered_data.columns if col not in ['Name', 'Parameters Count (B)', 'Average (lower=better)']])
180
 
181
- styler = filtered_data.style.format(formatter).background_gradient(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  cmap=cmap,
183
- subset=target_color_columns
184
- ).apply(color_column, subset=['Parameters Count (B)'])
 
 
 
 
 
 
 
 
 
185
 
186
  return styler
187
  else:
 
120
 
121
 
122
  def get_unique_column_names(all_data):
123
+
124
  # column_names = {}
125
  #
126
  # for folder_name, files in all_data.items():
 
179
  if 'Individual Tests' in color_columns:
180
  target_color_columns.extend([col for col in filtered_data.columns if col not in ['Name', 'Parameters Count (B)', 'Average (lower=better)']])
181
 
182
+ # styler = filtered_data.style.format(formatter).background_gradient(
183
+ # cmap=cmap,
184
+ # subset=target_color_columns,
185
+ # vmin=min_value,
186
+ # vmax=max_value
187
+ # ).apply(color_column, subset=['Parameters Count (B)'])
188
+
189
+ # for better visualization
190
+ second_largest = filtered_data['Average (lower=better)'].nlargest(2).iloc[-1]
191
+ min_value = filtered_data['Average (lower=better)'].min().min()
192
+ if len(models) == 1 and '~7B' in models:
193
+ max_value = second_largest
194
+ else:
195
+ max_value = filtered_data['Average (lower=better)'].max().max()
196
+
197
+ specific_column = 'Average (lower=better)'
198
+
199
+ styler_specific = filtered_data.style.background_gradient(
200
  cmap=cmap,
201
+ subset=[specific_column],
202
+ vmin=min_value,
203
+ vmax=max_value
204
+ )
205
+
206
+ styler_other = filtered_data.style.background_gradient(
207
+ cmap=cmap,
208
+ subset=[col for col in target_color_columns if col != specific_column]
209
+ )
210
+
211
+ styler = styler_specific.use(styler_other.export()).format(formatter).apply(color_column, subset=['Parameters Count (B)'])
212
 
213
  return styler
214
  else:
data/2024-05/7b.xlsx CHANGED
Binary files a/data/2024-05/7b.xlsx and b/data/2024-05/7b.xlsx differ