Skip to content

Commit eaf1a5f

Browse files
authored
Support out-of-core and distributed IVF_PQ ingestion (#531)
1 parent 53c8c15 commit eaf1a5f

20 files changed

+2405
-1339
lines changed

apis/python/src/tiledb/vector_search/index.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,14 @@ def consolidate_updates(self, retrain_index: bool = False, **kwargs):
543543

544544
# We don't copy the centroids if self.partitions=0 because this means our index was previously empty.
545545
copy_centroids_uri = None
546-
if self.index_type == "IVF_FLAT" and not retrain_index and self.partitions > 0:
547-
copy_centroids_uri = self.centroids_uri
546+
if (
547+
(self.index_type == "IVF_FLAT" or self.index_type == "IVF_PQ")
548+
and not retrain_index
549+
and self.partitions > 0
550+
):
551+
if self.index_type == "IVF_FLAT":
552+
# TODO(paris): Update so that IVF_PQ can also copy the centroids. We also need to pass the PQ-centroids.
553+
copy_centroids_uri = self.centroids_uri
548554
# Make sure the user didn't pass an incorrect number of partitions.
549555
if "partitions" in kwargs and self.partitions != kwargs["partitions"]:
550556
raise ValueError(

0 commit comments

Comments
 (0)