Skip to content

Commit b5736b5

Browse files
committed
Fix
1 parent 2214896 commit b5736b5

File tree

2 files changed

+32
-6
lines changed

2 files changed

+32
-6
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,10 @@ git push origin --tags
238238
### Updating the Website
239239
For website updates, refer to the [github_pages/README.md](./github_pages/README.md).
240240

241+
To update the leaderboard data on the website, run:
242+
```bash
243+
python scripts/make_leaderboard.py --update_pages
244+
```
241245

242246
## Acknowledgements
243247
- [Heron](https://github.com/turingmotors/heron): We refer to the Heron code for the evaluation of the Japanese Heron Bench task.

scripts/make_leaderboard.py

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ def process_results(result_dir: str, model_list: List[str]) -> pd.DataFrame:
6464
for model in model_list:
6565
logger.info(f"Processing results for {model}")
6666
model_results = load_evaluation_data(result_dir, model, task_dirs)
67+
if not model_results:
68+
continue
6769
df = df._append(model_results, ignore_index=True)
6870

6971
df = df.set_index("Model").round(2)
@@ -81,6 +83,8 @@ def generate_json_path(df: pd.DataFrame, output_path: str):
8183
json_data = []
8284

8385
for model, row in df.iterrows():
86+
if pd.isna(row).all():
87+
continue
8488
model_entry = {
8589
"model": model,
8690
"url": f"https://huggingface.co/{model}",
@@ -178,15 +182,33 @@ def main(
178182

179183
def parse_args():
180184
parser = ArgumentParser()
181-
parser.add_argument("--result_dir", type=str, default="result")
182-
parser.add_argument("--output_path", type=str, default="leaderboard.md")
183185
parser.add_argument(
184-
"--output_format", type=str, default="markdown", choices=["markdown", "latex"]
186+
"--result_dir",
187+
type=str,
188+
default="result",
189+
help="Directory containing evaluation results",
190+
)
191+
parser.add_argument(
192+
"--output_path",
193+
type=str,
194+
default="leaderboard.md",
195+
help="Output path for the leaderboard",
196+
)
197+
parser.add_argument(
198+
"--output_format",
199+
type=str,
200+
default="markdown",
201+
choices=["markdown", "latex"],
202+
help="Output format",
203+
)
204+
parser.add_argument(
205+
"--plot_bar", action="store_true", help="Plot bar plots for each task"
206+
)
207+
parser.add_argument(
208+
"--plot_corr", action="store_true", help="Plot correlation matrix between tasks"
185209
)
186-
parser.add_argument("--plot_bar", action="store_true")
187-
parser.add_argument("--plot_corr", action="store_true")
188210
parser.add_argument(
189-
"--update_pages", action="store_true"
211+
"--update_pages", action="store_true", help="Update the GitHub Pages JSON"
190212
)
191213
return parser.parse_args()
192214

0 commit comments

Comments
 (0)