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
I was able to use add_to_index successfully. The new file contents appear in the collection.json and also the updated pid_docid_map.json (in the index directory). When I perform a search, the model seems to return the right index (no 55 in my case). However, it is blowing up as below:
File /opt/conda/lib/python3.11/site-packages/ragatouille/models/colbert.py:411, in ColBERT.search(self, query, index_name, k, force_fast, zero_index_ranks, doc_ids)
409 result_for_query = []
410 for id_, rank, score in zip(*result):
--> 411 document_id = self.pid_docid_map[id_]
412 result_dict = {
413 "content": self.collection[id_],
414 "score": score,
(...)
417 "passage_id": id_,
418 }
420 if self.docid_metadata_map is not None:
KeyError: 55
Is pid_docid_map getting properly read during search? Please note that the search works with the other indexes from the first document.
The text was updated successfully, but these errors were encountered:
I figured it out. My search method was holding on to the older RAG instance, even after the add_to_index. I had to load the model from the index path for both add_to_index and for search.
I was able to use add_to_index successfully. The new file contents appear in the collection.json and also the updated pid_docid_map.json (in the index directory). When I perform a search, the model seems to return the right index (no 55 in my case). However, it is blowing up as below:
File /opt/conda/lib/python3.11/site-packages/ragatouille/models/colbert.py:411, in ColBERT.search(self, query, index_name, k, force_fast, zero_index_ranks, doc_ids)
409 result_for_query = []
410 for id_, rank, score in zip(*result):
--> 411 document_id = self.pid_docid_map[id_]
412 result_dict = {
413 "content": self.collection[id_],
414 "score": score,
(...)
417 "passage_id": id_,
418 }
420 if self.docid_metadata_map is not None:
KeyError: 55
Is pid_docid_map getting properly read during search? Please note that the search works with the other indexes from the first document.
The text was updated successfully, but these errors were encountered: