Skip to content

Commit

Permalink
Fix up call to compute_partitions in create_index
Browse files Browse the repository at this point in the history
  • Loading branch information
westonpace committed Jul 3, 2024
1 parent 401617a commit f9e7a41
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/python/lance/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,7 @@ def create_index(
accelerator,
)
partitions_file = compute_partitions(
self, column, kmeans, batch_size=20480
self, column[0], kmeans, batch_size=20480
)
kwargs["precomputed_partitions_file"] = partitions_file

Expand Down
2 changes: 1 addition & 1 deletion python/python/lance/indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def train_ivf(
# Use accelerator to train ivf centroids
from .vector import train_ivf_centroids_on_accelerator

ivf_centroids, kmeans = train_ivf_centroids_on_accelerator(
ivf_centroids, _ = train_ivf_centroids_on_accelerator(
self.dataset,
column[0],
num_partitions,
Expand Down
2 changes: 1 addition & 1 deletion python/python/lance/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def train_ivf_centroids_on_accelerator(
np.save(f, centroids)
logging.info("Saved centroids to %s", f.name)

return centroids, compute_partitions(dataset, column, kmeans, batch_size=20480)
return centroids, kmeans


def compute_partitions(
Expand Down

0 comments on commit f9e7a41

Please sign in to comment.