LiveBench / src /populate.py
pufanyi's picture
chore: Update envs.py with EVAL_REQUESTS_PATH_BACKEND and EVAL_RESULTS_PATH_BACKEND
2f420b7
raw
history blame
507 Bytes
import json
import os
import pandas as pd
from src.display.formatting import has_no_nan_values, make_clickable_model
from src.display.utils import AutoEvalColumn, EvalQueueColumn
from datasets import load_dataset
def get_leaderboard_df(results_repo, results_path, dataset_version):
hf_leaderboard = load_dataset(results_repo, dataset_version, split="test", cache_dir=results_path)
df = hf_leaderboard.to_pandas()
df = df.sort_values(by="Total", ascending=False)
print(df)
return df