Skip to content

Commit 2d6ec6f

Browse files
committed
update tutorial
1 parent 03eb4fc commit 2d6ec6f

8 files changed

Lines changed: 1063 additions & 25 deletions

File tree

FlagEmbedding/baai_general_embedding/finetune/eval_msmarco.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def evaluate(preds,
183183
for pred, label in zip(preds, labels):
184184
for k, cutoff in enumerate(cutoffs):
185185
recall = np.intersect1d(label, pred[:cutoff])
186-
recalls[k] += len(recall) / max(min(len(recall), len(label)), 1)
186+
recalls[k] += len(recall) / max(min(cutoff, len(label)), 1)
187187
recalls /= len(preds)
188188
for i, cutoff in enumerate(cutoffs):
189189
recall = recalls[i]
File renamed without changes.

0 commit comments

Comments
 (0)