From 2890b4cd4425686de9c191fcfdbea358c764cf4e Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Mon, 5 Sep 2022 02:09:36 +0300 Subject: [PATCH] Simplify extracting entries satisfying file filter --- src/search_filter/file_filter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search_filter/file_filter.py b/src/search_filter/file_filter.py index 2c565982..6aa7db78 100644 --- a/src/search_filter/file_filter.py +++ b/src/search_filter/file_filter.py @@ -67,7 +67,7 @@ class FileFilter(BaseFilter): # Get entries (and associated embeddings) satisfying file filters start = time.time() - entries = [entry for id, entry in enumerate(raw_entries) if id in included_entry_indices] + entries = [raw_entries[id] for id in included_entry_indices] embeddings = torch.index_select(raw_embeddings, 0, torch.tensor(list(included_entry_indices))) end = time.time()