Jellyfish042 commited on
Commit
8171dbf
1 Parent(s): 5dfb23a
app.py CHANGED
@@ -261,45 +261,6 @@ def submit_model(name):
261
  return "ERROR: Unexpected error. Please try again later."
262
 
263
 
264
- all_data = {}
265
- time_list = []
266
- for folder in get_folders_matching_format('data'):
267
- folder_name = os.path.basename(folder)
268
- time_list.append(folder_name)
269
- if all_data.get(folder) is None:
270
- all_data[folder_name] = {}
271
- for file_name in file_name_list:
272
- if all_data.get(file_name) is None:
273
- all_data[folder_name][file_name] = {}
274
- for sheet_name in sheet_name_list:
275
- final_file_name = os.path.join(folder, file_name)
276
- all_data[folder_name][file_name][sheet_name] = rename_columns(
277
- pd.read_excel(final_file_name + '.xlsx', sheet_name=sheet_name))
278
-
279
-
280
- # def create_scaling_plot(all_data, period):
281
- # selected_columns = ['Name', 'Parameters Count (B)', 'Average (The lower the better)']
282
- # target_data = all_data[period]
283
- # new_df = pd.DataFrame()
284
- #
285
- # for size in target_data.keys():
286
- # new_df = pd.concat([new_df, target_data[size]['cr'].loc[:, selected_columns]], axis=0)
287
- #
288
- # new_df.rename(columns={
289
- # 'Parameters Count (B)': 'Params(B)',
290
- # 'Average (The lower the better)': 'Compression Rate (%)'
291
- # }, inplace=True)
292
- #
293
- # fig = px.scatter(new_df,
294
- # x='Params(B)',
295
- # y='Compression Rate (%)',
296
- # title='Compression Rate Scaling Law',
297
- # hover_name='Name'
298
- # )
299
- # fig.update_traces(marker=dict(size=12))
300
- # return fig
301
-
302
-
303
  def create_scaling_plot(all_data, period):
304
  selected_columns = ['Name', 'Parameters Count (B)', 'Average (The lower the better)']
305
  target_data = all_data[period]
@@ -385,6 +346,21 @@ def create_scaling_plot(all_data, period):
385
  return fig
386
 
387
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
388
  initial_fig = create_scaling_plot(all_data, time_list[-1])
389
 
390
  initial_period = time_list[-1]
 
261
  return "ERROR: Unexpected error. Please try again later."
262
 
263
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
264
  def create_scaling_plot(all_data, period):
265
  selected_columns = ['Name', 'Parameters Count (B)', 'Average (The lower the better)']
266
  target_data = all_data[period]
 
346
  return fig
347
 
348
 
349
+ all_data = {}
350
+ time_list = []
351
+ for folder in get_folders_matching_format('data'):
352
+ folder_name = os.path.basename(folder)
353
+ time_list.append(folder_name)
354
+ if all_data.get(folder) is None:
355
+ all_data[folder_name] = {}
356
+ for file_name in file_name_list:
357
+ if all_data.get(file_name) is None:
358
+ all_data[folder_name][file_name] = {}
359
+ for sheet_name in sheet_name_list:
360
+ final_file_name = os.path.join(folder, file_name)
361
+ all_data[folder_name][file_name][sheet_name] = rename_columns(
362
+ pd.read_excel(final_file_name + '.xlsx', sheet_name=sheet_name))
363
+
364
  initial_fig = create_scaling_plot(all_data, time_list[-1])
365
 
366
  initial_period = time_list[-1]
data/2024-07/1b5.xlsx ADDED
Binary file (15.2 kB). View file
 
data/2024-07/3b.xlsx ADDED
Binary file (14.8 kB). View file
 
data/2024-07/7b.xlsx ADDED
Binary file (15.1 kB). View file
 
data/2024-07/9b.xlsx ADDED
Binary file (11.5 kB). View file