MINGYISU commited on
Commit
592b931
·
verified ·
1 Parent(s): a9700b8

Update utils_v2.py

Browse files
Files changed (1) hide show
  1. utils_v2.py +2 -3
utils_v2.py CHANGED
@@ -93,10 +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 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)
102
  return all_scores
 
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
  if isinstance(score, dict):
97
+ if modality == 'visdoc':
98
+ metric = "ndcg_linear@5" if "ndcg_linear@5" in score else "ndcg@5"
99
  score = score.get(metric, 0.0)
100
  all_scores[dataset] = round(score, 2)
101
  return all_scores