You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason when using the monoT5 reranker class to rerank results from a LuceneSearcher it assigns the same score to every document.
I was able to fix this problem by changing a line in the rescore() method in pygaggle.rerank.transformer.MonoT5 from for doc, score in zip(batch.documents, batch_log_probs): doc.score = score
to for i, doc in enumerate(batch.documents): score = batch_log_probs[i] texts[i].score = score
For some reason when using the monoT5 reranker class to rerank results from a LuceneSearcher it assigns the same score to every document.
I was able to fix this problem by changing a line in the rescore() method in pygaggle.rerank.transformer.MonoT5 from
for doc, score in zip(batch.documents, batch_log_probs): doc.score = score
to
for i, doc in enumerate(batch.documents): score = batch_log_probs[i] texts[i].score = score
Full method for reference:
The text was updated successfully, but these errors were encountered: