File size: 579 Bytes
8c49cb6
 
 
 
 
df66f6e
314f91a
8c49cb6
046ddc7
8c49cb6
 
046ddc7
 
 
903180b
7660cbc
93dabac
8b28d2b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)
    df = df.round(2)  # Round all numeric columns to two decimal places
    print(df)
    return df