From f6bfb5da11324c6962140c1a07e2d0f96a3231f9 Mon Sep 17 00:00:00 2001 From: Rob Meng Date: Thu, 14 Sep 2023 16:02:23 -0400 Subject: [PATCH] chore: upgrade lance to 0.7.4 (#491) --- Cargo.toml | 3 ++- python/pyproject.toml | 2 +- rust/ffi/node/Cargo.toml | 1 + rust/ffi/node/src/index/vector.rs | 2 +- rust/ffi/node/src/query.rs | 2 +- rust/vectordb/Cargo.toml | 1 + rust/vectordb/src/index/vector.rs | 7 +++++-- rust/vectordb/src/query.rs | 4 ++-- 8 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 537fd6bd..e8cac48e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,8 @@ exclude = ["python"] resolver = "2" [workspace.dependencies] -lance = { "version" = "=0.7.3", "features" = ["dynamodb"] } +lance = { "version" = "=0.7.4", "features" = ["dynamodb"] } +lance-linalg = { "version" = "=0.7.4" } # Note that this one does not include pyarrow arrow = { version = "43.0.0", optional = false } arrow-array = "43.0" diff --git a/python/pyproject.toml b/python/pyproject.toml index 0f7b7c4e..30e0ca5c 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -2,7 +2,7 @@ name = "lancedb" version = "0.2.3" dependencies = [ - "pylance==0.7.3", + "pylance==0.7.4", "ratelimiter", "retry", "tqdm", diff --git a/rust/ffi/node/Cargo.toml b/rust/ffi/node/Cargo.toml index 115cd44b..e73e3403 100644 --- a/rust/ffi/node/Cargo.toml +++ b/rust/ffi/node/Cargo.toml @@ -18,6 +18,7 @@ once_cell = "1" futures = "0.3" half = { workspace = true } lance = { workspace = true } +lance-linalg = { workspace = true } vectordb = { path = "../../vectordb" } tokio = { version = "1.23", features = ["rt-multi-thread"] } neon = {version = "0.10.1", default-features = false, features = ["channel-api", "napi-6", "promise-api", "task-api"] } diff --git a/rust/ffi/node/src/index/vector.rs b/rust/ffi/node/src/index/vector.rs index cd431c5d..39795402 100644 --- a/rust/ffi/node/src/index/vector.rs +++ b/rust/ffi/node/src/index/vector.rs @@ -14,7 +14,7 @@ use lance::index::vector::ivf::IvfBuildParams; use lance::index::vector::pq::PQBuildParams; -use lance::index::vector::MetricType; +use lance_linalg::distance::MetricType; use neon::context::FunctionContext; use neon::prelude::*; use std::convert::TryFrom; diff --git a/rust/ffi/node/src/query.rs b/rust/ffi/node/src/query.rs index 94923e09..566ee6ee 100644 --- a/rust/ffi/node/src/query.rs +++ b/rust/ffi/node/src/query.rs @@ -3,7 +3,7 @@ use std::ops::Deref; use arrow_array::Float32Array; use futures::{TryFutureExt, TryStreamExt}; -use lance::index::vector::MetricType; +use lance_linalg::distance::MetricType; use neon::context::FunctionContext; use neon::handle::Handle; use neon::prelude::*; diff --git a/rust/vectordb/Cargo.toml b/rust/vectordb/Cargo.toml index 3e497c38..dc78af55 100644 --- a/rust/vectordb/Cargo.toml +++ b/rust/vectordb/Cargo.toml @@ -20,6 +20,7 @@ object_store = { workspace = true } snafu = { workspace = true } half = { workspace = true } lance = { workspace = true } +lance-linalg = { workspace = true } tokio = { version = "1.23", features = ["rt-multi-thread"] } log = { workspace = true } num-traits = "0" diff --git a/rust/vectordb/src/index/vector.rs b/rust/vectordb/src/index/vector.rs index bfad66e6..e611c328 100644 --- a/rust/vectordb/src/index/vector.rs +++ b/rust/vectordb/src/index/vector.rs @@ -14,7 +14,8 @@ use lance::index::vector::ivf::IvfBuildParams; use lance::index::vector::pq::PQBuildParams; -use lance::index::vector::{MetricType, VectorIndexParams}; +use lance::index::vector::VectorIndexParams; +use lance_linalg::distance::MetricType; pub trait VectorIndexBuilder { fn get_column(&self) -> Option; @@ -107,9 +108,11 @@ impl VectorIndexBuilder for IvfPQIndexBuilder { #[cfg(test)] mod tests { + use super::*; + use lance::index::vector::ivf::IvfBuildParams; use lance::index::vector::pq::PQBuildParams; - use lance::index::vector::{MetricType, StageParams}; + use lance::index::vector::StageParams; use crate::index::vector::{IvfPQIndexBuilder, VectorIndexBuilder}; diff --git a/rust/vectordb/src/query.rs b/rust/vectordb/src/query.rs index fb7bbb38..efc0f9cb 100644 --- a/rust/vectordb/src/query.rs +++ b/rust/vectordb/src/query.rs @@ -17,7 +17,7 @@ use std::sync::Arc; use arrow_array::Float32Array; use lance::dataset::scanner::{DatasetRecordBatchStream, Scanner}; use lance::dataset::Dataset; -use lance::index::vector::MetricType; +use lance_linalg::distance::MetricType; use crate::error::Result; @@ -164,10 +164,10 @@ impl Query { mod tests { use std::sync::Arc; + use super::*; use arrow_array::{Float32Array, RecordBatch, RecordBatchIterator, RecordBatchReader}; use arrow_schema::{DataType, Field as ArrowField, Schema as ArrowSchema}; use lance::dataset::Dataset; - use lance::index::vector::MetricType; use crate::query::Query;