Spaces:
Running
Running
Update utils_v2.py
Browse files- utils_v2.py +3 -1
utils_v2.py
CHANGED
@@ -93,7 +93,9 @@ def load_scores(raw_scores=None):
|
|
93 |
score = raw_scores.get(modality, {}).get(dataset, 0.0)
|
94 |
score = 0.0 if score == "FILE_N/A" else score
|
95 |
metric = SPECIAL_METRICS.get(dataset, 'hit@1')
|
96 |
-
metric = "ndcg@5" if modality == 'visdoc' else metric
|
|
|
|
|
97 |
if isinstance(score, dict):
|
98 |
score = score.get(metric, 0.0)
|
99 |
all_scores[dataset] = round(score, 2)
|
|
|
93 |
score = raw_scores.get(modality, {}).get(dataset, 0.0)
|
94 |
score = 0.0 if score == "FILE_N/A" else score
|
95 |
metric = SPECIAL_METRICS.get(dataset, 'hit@1')
|
96 |
+
# metric = "ndcg@5" if modality == 'visdoc' else metric
|
97 |
+
if modality == 'visdoc':
|
98 |
+
metric = "ndcg_linear@5" if "ndcg_linear@5" in score else "ndcg@5"
|
99 |
if isinstance(score, dict):
|
100 |
score = score.get(metric, 0.0)
|
101 |
all_scores[dataset] = round(score, 2)
|