sh1gechan commited on
Commit
582d3da
1 Parent(s): a9c9b4c

Update src/populate.py

Browse files
Files changed (1) hide show
  1. src/populate.py +9 -2
src/populate.py CHANGED
@@ -15,8 +15,15 @@ def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchm
15
 
16
 
17
  df = pd.DataFrame.from_records(all_data_json)
18
- # df = df.sort_values(by=[AutoEvalColumn.average.name], ascending=False)
19
- print("cols", cols)
 
 
 
 
 
 
 
20
  df = df[cols].round(decimals=2)
21
 
22
  # filter out if any of the benchmarks have not been produced
 
15
 
16
 
17
  df = pd.DataFrame.from_records(all_data_json)
18
+ score_cols = [
19
+ 'ALT J to E BLEU', 'WikiCorpus E to J BLEU', 'WikiCorpus J to E BLEU',
20
+ 'XL-Sum JA BLEU', 'XL-Sum ROUGE1', 'XL-Sum ROUGE2', 'XL-Sum ROUGE-Lsum'
21
+ ]
22
+
23
+ existing_score_cols = [col for col in score_cols if col in df.columns]
24
+
25
+ # スコア列を100で割り、.4f形式でフォーマット
26
+ df[existing_score_cols] = (df[existing_score_cols] / 100).applymap(lambda x: f'{x:.4f}')
27
  df = df[cols].round(decimals=2)
28
 
29
  # filter out if any of the benchmarks have not been produced