saattrupdan
commited on
Commit
•
64071e4
1
Parent(s):
a1248d7
fix: Fetch new results properly
Browse files
app.py
CHANGED
@@ -670,6 +670,9 @@ def fetch_results() -> dict[Language, pd.DataFrame]:
|
|
670 |
data_dict = defaultdict(dict)
|
671 |
for record in records:
|
672 |
model_name = record["model"]
|
|
|
|
|
|
|
673 |
|
674 |
dataset_name = record["dataset"]
|
675 |
if dataset_name in possible_dataset_names:
|
@@ -681,7 +684,7 @@ def fetch_results() -> dict[Language, pd.DataFrame]:
|
|
681 |
f"test_{dataset.task.metric}",
|
682 |
test_score_dict.get(dataset.task.metric)
|
683 |
)
|
684 |
-
for test_score_dict in
|
685 |
]
|
686 |
if dataset.task in data_dict[model_name]:
|
687 |
data_dict[model_name][dataset.task].append(scores)
|
|
|
670 |
data_dict = defaultdict(dict)
|
671 |
for record in records:
|
672 |
model_name = record["model"]
|
673 |
+
raw_results = record["results"]["raw"]
|
674 |
+
if isinstance(raw_results, dict) and "test" in raw_results:
|
675 |
+
raw_results = raw_results.get("test", raw_results)
|
676 |
|
677 |
dataset_name = record["dataset"]
|
678 |
if dataset_name in possible_dataset_names:
|
|
|
684 |
f"test_{dataset.task.metric}",
|
685 |
test_score_dict.get(dataset.task.metric)
|
686 |
)
|
687 |
+
for test_score_dict in raw_results
|
688 |
]
|
689 |
if dataset.task in data_dict[model_name]:
|
690 |
data_dict[model_name][dataset.task].append(scores)
|