Small changes
Browse files- app.py +0 -1
- src/leaderboard/read_evals.py +7 -6
app.py
CHANGED
|
@@ -126,7 +126,6 @@ def init_leaderboard(dataframe, default_selection=None, hidden_columns=None):
|
|
| 126 |
)
|
| 127 |
'''
|
| 128 |
|
| 129 |
-
|
| 130 |
def download_snapshot(repo, local_dir):
|
| 131 |
"""Try to download a snapshot from Hugging Face Hub."""
|
| 132 |
try:
|
|
|
|
| 126 |
)
|
| 127 |
'''
|
| 128 |
|
|
|
|
| 129 |
def download_snapshot(repo, local_dir):
|
| 130 |
"""Try to download a snapshot from Hugging Face Hub."""
|
| 131 |
try:
|
src/leaderboard/read_evals.py
CHANGED
|
@@ -44,21 +44,22 @@ class EvalResult:
|
|
| 44 |
config = data.get("config")
|
| 45 |
|
| 46 |
#average_CPS = f"{data.get('average_CPS'):.2f}"
|
| 47 |
-
#
|
| 48 |
average_CPS = float(data.get('average_CPS', 0.0)) # 0.0 come valore di default
|
| 49 |
-
|
| 50 |
-
fewshot = config.get("num_fewshot", False)
|
| 51 |
|
| 52 |
try:
|
| 53 |
if fewshot == "5":
|
| 54 |
is_5fewshot = True
|
| 55 |
else:
|
| 56 |
-
is_5fewshot = False
|
| 57 |
except ValueError:
|
| 58 |
-
is_5fewshot = False
|
| 59 |
# Determine the few-shot type (ZS or FS) based on num_fewshot
|
| 60 |
fewshot_symbol = FewShotType.from_num_fewshot(is_5fewshot) # Use the new
|
| 61 |
|
|
|
|
| 62 |
num_params = int(0)
|
| 63 |
num_params_billion = config.get("num_params_billion")
|
| 64 |
if num_params_billion is not None:
|
|
@@ -89,7 +90,7 @@ class EvalResult:
|
|
| 89 |
if architectures:
|
| 90 |
architecture = ";".join(architectures)
|
| 91 |
|
| 92 |
-
# Extract
|
| 93 |
results = {}
|
| 94 |
for task in Tasks:
|
| 95 |
task = task.value
|
|
|
|
| 44 |
config = data.get("config")
|
| 45 |
|
| 46 |
#average_CPS = f"{data.get('average_CPS'):.2f}"
|
| 47 |
+
# Get average_CPS
|
| 48 |
average_CPS = float(data.get('average_CPS', 0.0)) # 0.0 come valore di default
|
| 49 |
+
# Get number of fewshot
|
| 50 |
+
fewshot = config.get("num_fewshot", False)
|
| 51 |
|
| 52 |
try:
|
| 53 |
if fewshot == "5":
|
| 54 |
is_5fewshot = True
|
| 55 |
else:
|
| 56 |
+
is_5fewshot = False
|
| 57 |
except ValueError:
|
| 58 |
+
is_5fewshot = False
|
| 59 |
# Determine the few-shot type (ZS or FS) based on num_fewshot
|
| 60 |
fewshot_symbol = FewShotType.from_num_fewshot(is_5fewshot) # Use the new
|
| 61 |
|
| 62 |
+
# Determine the number of parameters of the models
|
| 63 |
num_params = int(0)
|
| 64 |
num_params_billion = config.get("num_params_billion")
|
| 65 |
if num_params_billion is not None:
|
|
|
|
| 90 |
if architectures:
|
| 91 |
architecture = ";".join(architectures)
|
| 92 |
|
| 93 |
+
# Extract the results of the models
|
| 94 |
results = {}
|
| 95 |
for task in Tasks:
|
| 96 |
task = task.value
|