diff --git a/Cargo.toml b/Cargo.toml index fece2d7c..ec0f5cfa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,9 +5,9 @@ exclude = ["python"] resolver = "2" [workspace.dependencies] -lance = { "version" = "=0.8.9", "features" = ["dynamodb"] } -lance-linalg = { "version" = "=0.8.9" } -lance-testing = { "version" = "=0.8.9" } +lance = { "version" = "=0.8.10", "features" = ["dynamodb"] } +lance-linalg = { "version" = "=0.8.10" } +lance-testing = { "version" = "=0.8.10" } # Note that this one does not include pyarrow arrow = { version = "47.0.0", optional = false } arrow-array = "47.0" diff --git a/python/pyproject.toml b/python/pyproject.toml index 18e46183..b2a5c6af 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -3,7 +3,7 @@ name = "lancedb" version = "0.3.2" dependencies = [ "deprecation", - "pylance==0.8.9", + "pylance==0.8.10", "ratelimiter~=1.0", "retry>=0.9.2", "tqdm>=4.1.0", diff --git a/rust/ffi/node/src/index/vector.rs b/rust/ffi/node/src/index/vector.rs index 9412d097..1055b94a 100644 --- a/rust/ffi/node/src/index/vector.rs +++ b/rust/ffi/node/src/index/vector.rs @@ -70,7 +70,6 @@ fn get_index_params_builder( .map(|mt| { let metric_type = mt.unwrap(); index_builder.metric_type(metric_type); - pq_params.metric_type = metric_type; }); let num_partitions = obj.get_opt_usize(cx, "num_partitions")?; diff --git a/rust/vectordb/src/index/vector.rs b/rust/vectordb/src/index/vector.rs index dd327c09..90ed38fb 100644 --- a/rust/vectordb/src/index/vector.rs +++ b/rust/vectordb/src/index/vector.rs @@ -99,7 +99,11 @@ impl VectorIndexBuilder for IvfPQIndexBuilder { let ivf_params = self.ivf_params.clone().unwrap_or_default(); let pq_params = self.pq_params.clone().unwrap_or_default(); - VectorIndexParams::with_ivf_pq_params(pq_params.metric_type, ivf_params, pq_params) + VectorIndexParams::with_ivf_pq_params( + self.metric_type.unwrap_or(MetricType::L2), + ivf_params, + pq_params, + ) } fn get_replace(&self) -> bool { @@ -180,7 +184,6 @@ mod tests { pq_params.max_iters = 1; pq_params.num_bits = 8; pq_params.num_sub_vectors = 50; - pq_params.metric_type = MetricType::Cosine; pq_params.max_opq_iters = 2; index_builder.ivf_params(ivf_params); index_builder.pq_params(pq_params); @@ -198,7 +201,6 @@ mod tests { assert_eq!(pq_params.max_iters, 1); assert_eq!(pq_params.num_bits, 8); assert_eq!(pq_params.num_sub_vectors, 50); - assert_eq!(pq_params.metric_type, MetricType::Cosine); assert_eq!(pq_params.max_opq_iters, 2); } else { assert!(false, "Expected second stage to be pq") diff --git a/rust/vectordb/src/table.rs b/rust/vectordb/src/table.rs index 3a22c014..e16983ac 100644 --- a/rust/vectordb/src/table.rs +++ b/rust/vectordb/src/table.rs @@ -27,7 +27,7 @@ use lance::io::object_store::WrappingObjectStore; use std::path::Path; use crate::error::{Error, Result}; -use crate::index::vector::{VectorIndexBuilder, VectorIndex}; +use crate::index::vector::{VectorIndex, VectorIndexBuilder}; use crate::query::Query; use crate::utils::{PatchReadParam, PatchWriteParam}; use crate::WriteMode; @@ -393,11 +393,12 @@ impl Table { } pub async fn load_indices(&self) -> Result> { - let (indices, mf) = futures::try_join!( - self.dataset.load_indices(), - self.dataset.latest_manifest() - )?; - Ok(indices.iter().map(|i| VectorIndex::new_from_format(&mf, i)).collect()) + let (indices, mf) = + futures::try_join!(self.dataset.load_indices(), self.dataset.latest_manifest())?; + Ok(indices + .iter() + .map(|i| VectorIndex::new_from_format(&mf, i)) + .collect()) } }