Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Update retrievers.py in RAG #3881

Merged
merged 2 commits into from
Aug 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion parlai/agents/rag/retrievers.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ def index_retrieve(
'[ If using a compressed index, try building an exact index: ]\n'
'[ $ python index_dense_embeddings --indexer-type exact... ]'
)
scores.fill_(1)
scores[scores != scores] = 1
ids = torch.tensor([[int(s) for s in ss] for ss in ids])

return ids, scores
Expand Down