fix index builder key bug
This commit is contained in:
@@ -195,9 +195,10 @@ class Index_Builder:
|
||||
|
||||
for start_idx in tqdm(range(0, len(self.corpus), self.batch_size), desc='Inference Embeddings:'):
|
||||
|
||||
batch_data_title = self.corpus[start_idx:start_idx+self.batch_size]['title']
|
||||
batch_data_text = self.corpus[start_idx:start_idx+self.batch_size]['text']
|
||||
batch_data = ['"' + title + '"\n' + text for title, text in zip(batch_data_title, batch_data_text)]
|
||||
# batch_data_title = self.corpus[start_idx:start_idx+self.batch_size]['title']
|
||||
# batch_data_text = self.corpus[start_idx:start_idx+self.batch_size]['text']
|
||||
# batch_data = ['"' + title + '"\n' + text for title, text in zip(batch_data_title, batch_data_text)]
|
||||
batch_data = self.corpus[start_idx:start_idx+self.batch_size]['contents']
|
||||
|
||||
if self.retrieval_method == "e5":
|
||||
batch_data = [f"passage: {doc}" for doc in batch_data]
|
||||
|
||||
Reference in New Issue
Block a user