Skip to content

Commit

Permalink
Support out-of-core and distributed IVF_PQ ingestion (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
jparismorgan authored Oct 17, 2024
1 parent 53c8c15 commit eaf1a5f
Show file tree
Hide file tree
Showing 20 changed files with 2,405 additions and 1,339 deletions.
10 changes: 8 additions & 2 deletions apis/python/src/tiledb/vector_search/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,14 @@ def consolidate_updates(self, retrain_index: bool = False, **kwargs):

# We don't copy the centroids if self.partitions=0 because this means our index was previously empty.
copy_centroids_uri = None
if self.index_type == "IVF_FLAT" and not retrain_index and self.partitions > 0:
copy_centroids_uri = self.centroids_uri
if (
(self.index_type == "IVF_FLAT" or self.index_type == "IVF_PQ")
and not retrain_index
and self.partitions > 0
):
if self.index_type == "IVF_FLAT":
# TODO(paris): Update so that IVF_PQ can also copy the centroids. We also need to pass the PQ-centroids.
copy_centroids_uri = self.centroids_uri
# Make sure the user didn't pass an incorrect number of partitions.
if "partitions" in kwargs and self.partitions != kwargs["partitions"]:
raise ValueError(
Expand Down
Loading

0 comments on commit eaf1a5f

Please sign in to comment.