FlagEmbedding icon indicating copy to clipboard operation
FlagEmbedding copied to clipboard

Calculate AUC error

Open dg618k opened this issue 1 year ago • 2 comments

The pred_hard_encodings size dismatch with preds_scores when faiss indice has -1. so I retrieve preds_scores first len(pred_hard_encoding) to make it correct. Does it introduce any other problems? Thank you.

dg618k avatar Aug 10 '24 01:08 dg618k

@dg618k , Can you show the code you revised?

staoxiao avatar Aug 10 '24 15:08 staoxiao

@staoxiao Ok, in eval_msmarco.py around line 200. The codes I modified are:

n_score = []
for pred, label, cur_score in zip(preds, labels, preds_scores):
   ......
   n_score.append(cur_score[:len(pred_hard_encoding)])
preds_scores1d = np.asarray(n_score).flatten()

dg618k avatar Aug 12 '24 02:08 dg618k