mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +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
|
# Get entries (and associated embeddings) satisfying file filters
|
||||||
start = time.time()
|
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)))
|
embeddings = torch.index_select(raw_embeddings, 0, torch.tensor(list(included_entry_indices)))
|
||||||
|
|
||||||
end = time.time()
|
end = time.time()
|
||||||
|
|
Loading…
Reference in a new issue