Compare commits

..

1 Commits

Author SHA1 Message Date
Andrew Yao
ea1f96dab0 build(python): Add project.dynamic = ["version"] to pyproject.toml 2024-12-24 22:27:54 -08:00
5 changed files with 5 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
[tool.bumpversion]
current_version = "0.17.2-beta.0"
current_version = "0.17.1"
parse = """(?x)
(?P<major>0|[1-9]\\d*)\\.
(?P<minor>0|[1-9]\\d*)\\.

View File

@@ -1,6 +1,6 @@
[package]
name = "lancedb-python"
version = "0.17.2-beta.0"
version = "0.17.1"
edition.workspace = true
description = "Python bindings for LanceDB"
license.workspace = true

View File

@@ -1,5 +1,6 @@
[project]
name = "lancedb"
dynamic = ["version"]
# version in Cargo.toml
dependencies = [
"deprecation",

View File

@@ -19,7 +19,7 @@ import warnings
from lancedb._lancedb import IndexConfig
from lancedb.embeddings.base import EmbeddingFunctionConfig
from lancedb.index import FTS, BTree, Bitmap, HnswPq, HnswSq, IvfFlat, IvfPq, LabelList
from lancedb.index import FTS, BTree, Bitmap, HnswPq, HnswSq, IvfPq, LabelList
from lancedb.remote.db import LOOP
import pyarrow as pa
@@ -235,12 +235,10 @@ class RemoteTable(Table):
config = HnswPq(distance_type=metric)
elif index_type == "IVF_HNSW_SQ":
config = HnswSq(distance_type=metric)
elif index_type == "IVF_FLAT":
config = IvfFlat(distance_type=metric)
else:
raise ValueError(
f"Unknown vector index type: {index_type}. Valid options are"
" 'IVF_FLAT', 'IVF_PQ', 'IVF_HNSW_PQ', 'IVF_HNSW_SQ'"
" 'IVF_PQ', 'IVF_HNSW_PQ', 'IVF_HNSW_SQ'"
)
LOOP.run(self._table.create_index(vector_column_name, config=config))

View File

@@ -563,7 +563,6 @@ impl<S: HttpSend> TableInternal for RemoteTable<S> {
let (index_type, distance_type) = match index.index {
// TODO: Should we pass the actual index parameters? SaaS does not
// yet support them.
Index::IvfFlat(index) => ("IVF_FLAT", Some(index.distance_type)),
Index::IvfPq(index) => ("IVF_PQ", Some(index.distance_type)),
Index::IvfHnswSq(index) => ("IVF_HNSW_SQ", Some(index.distance_type)),
Index::BTree(_) => ("BTREE", None),
@@ -874,7 +873,6 @@ mod tests {
use lance_index::scalar::FullTextSearchQuery;
use reqwest::Body;
use crate::index::vector::IvfFlatIndexBuilder;
use crate::{
index::{vector::IvfPqIndexBuilder, Index, IndexStatistics, IndexType},
query::{ExecutableQuery, QueryBase},
@@ -1491,11 +1489,6 @@ mod tests {
#[tokio::test]
async fn test_create_index() {
let cases = [
(
"IVF_FLAT",
Some("hamming"),
Index::IvfFlat(IvfFlatIndexBuilder::default().distance_type(DistanceType::Hamming)),
),
("IVF_PQ", Some("l2"), Index::IvfPq(Default::default())),
(
"IVF_PQ",