Skip to content

Commit

Permalink
Removed delete logic from usearch
Browse files Browse the repository at this point in the history
  • Loading branch information
Pringled committed Nov 19, 2024
1 parent afe7cbe commit 031db4f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion vicinity/backends/faiss.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ def delete(self, indices: list[int]) -> None:
"""Delete vectors from the backend, if supported."""
if hasattr(self.index, "remove_ids"):
if isinstance(self.index, faiss.IndexIVF):
raise NotImplementedError("Deletion for IVF indexes is not supported (yet).")
# Use IDSelectorArray for IVF indexes
id_selector = faiss.IDSelectorArray(np.array(indices, dtype=np.int64))
else:
Expand Down
1 change: 0 additions & 1 deletion vicinity/backends/hnsw.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def insert(self, vectors: npt.NDArray) -> None:

def delete(self, indices: list[int]) -> None:
"""Delete vectors from the backend."""
raise NotImplementedError("Deletion is not supported for HNSW (yet).")
for index in indices:
self.index.mark_deleted(index)

Expand Down

0 comments on commit 031db4f

Please sign in to comment.