Spaces:
Building
on
CPU Upgrade
Building
on
CPU Upgrade
Update src/populate.py
Browse files- src/populate.py +7 -7
src/populate.py
CHANGED
@@ -15,15 +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 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
|
23 |
-
|
24 |
|
25 |
-
#
|
26 |
-
|
27 |
df = df[cols].round(decimals=2)
|
28 |
|
29 |
# 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 E to J BLEU', '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
|