Spaces:
AIR-Bench
/
Running on CPU Upgrade

nan commited on
Commit
5e03e4a
1 Parent(s): 4791ac5

fix: fix the format

Browse files
Files changed (1) hide show
  1. src/loaders.py +4 -5
src/loaders.py CHANGED
@@ -58,14 +58,13 @@ def load_leaderboard_datastore(file_path) -> LeaderboardDataStore:
58
 
59
  lb_data_store.raw_df_qa = get_leaderboard_df(
60
  lb_data_store.raw_data, task='qa', metric=DEFAULT_METRIC_QA)
61
- lb_data_store.leaderboard_df_qa = lb_data_store.raw_df_qa.copy()
62
- # leaderboard_df_qa = leaderboard_df_qa[has_no_nan_values(df, _benchmark_cols)]
63
  print(f'QA data loaded: {lb_data_store.raw_df_qa.shape}')
 
64
  shown_columns_qa, types_qa = get_default_cols(
65
  'qa', lb_data_store.leaderboard_df_qa.columns, add_fix_cols=True)
66
  lb_data_store.types_qa = types_qa
67
  lb_data_store.leaderboard_df_qa = \
68
- lb_data_store.leaderboard_df_qa[~lb_data_store.leaderboard_df_qa[COL_NAME_IS_ANONYMOUS]][shown_columns_qa]
69
  lb_data_store.leaderboard_df_qa.drop([COL_NAME_REVISION, COL_NAME_TIMESTAMP], axis=1, inplace=True)
70
 
71
  lb_data_store.raw_df_long_doc = get_leaderboard_df(
@@ -76,8 +75,8 @@ def load_leaderboard_datastore(file_path) -> LeaderboardDataStore:
76
  'long-doc', lb_data_store.leaderboard_df_long_doc.columns, add_fix_cols=True)
77
  lb_data_store.types_long_doc = types_long_doc
78
  lb_data_store.leaderboard_df_long_doc = \
79
- lb_data_store.leaderboard_df_long_doc[~lb_data_store.leaderboard_df_long_doc[COL_NAME_IS_ANONYMOUS]][
80
- shown_columns_long_doc]
81
  lb_data_store.leaderboard_df_long_doc.drop([COL_NAME_REVISION, COL_NAME_TIMESTAMP], axis=1, inplace=True)
82
 
83
  lb_data_store.reranking_models = sorted(
 
58
 
59
  lb_data_store.raw_df_qa = get_leaderboard_df(
60
  lb_data_store.raw_data, task='qa', metric=DEFAULT_METRIC_QA)
 
 
61
  print(f'QA data loaded: {lb_data_store.raw_df_qa.shape}')
62
+ lb_data_store.leaderboard_df_qa = lb_data_store.raw_df_qa.copy()
63
  shown_columns_qa, types_qa = get_default_cols(
64
  'qa', lb_data_store.leaderboard_df_qa.columns, add_fix_cols=True)
65
  lb_data_store.types_qa = types_qa
66
  lb_data_store.leaderboard_df_qa = \
67
+ lb_data_store.leaderboard_df_qa[~lb_data_store.leaderboard_df_qa[COL_NAME_IS_ANONYMOUS]][shown_columns_qa]
68
  lb_data_store.leaderboard_df_qa.drop([COL_NAME_REVISION, COL_NAME_TIMESTAMP], axis=1, inplace=True)
69
 
70
  lb_data_store.raw_df_long_doc = get_leaderboard_df(
 
75
  'long-doc', lb_data_store.leaderboard_df_long_doc.columns, add_fix_cols=True)
76
  lb_data_store.types_long_doc = types_long_doc
77
  lb_data_store.leaderboard_df_long_doc = \
78
+ lb_data_store.leaderboard_df_long_doc[
79
+ ~lb_data_store.leaderboard_df_long_doc[COL_NAME_IS_ANONYMOUS]][shown_columns_long_doc]
80
  lb_data_store.leaderboard_df_long_doc.drop([COL_NAME_REVISION, COL_NAME_TIMESTAMP], axis=1, inplace=True)
81
 
82
  lb_data_store.reranking_models = sorted(