mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Simplify extracting entries satisfying file filter
This commit is contained in:
parent
7606724dbc
commit
2890b4cd44
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue