mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-06 20:02:58 +00:00
chore: bump lance to 8.10 (#622)
This commit is contained in:
@@ -5,9 +5,9 @@ exclude = ["python"]
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
lance = { "version" = "=0.8.9", "features" = ["dynamodb"] }
|
lance = { "version" = "=0.8.10", "features" = ["dynamodb"] }
|
||||||
lance-linalg = { "version" = "=0.8.9" }
|
lance-linalg = { "version" = "=0.8.10" }
|
||||||
lance-testing = { "version" = "=0.8.9" }
|
lance-testing = { "version" = "=0.8.10" }
|
||||||
# Note that this one does not include pyarrow
|
# Note that this one does not include pyarrow
|
||||||
arrow = { version = "47.0.0", optional = false }
|
arrow = { version = "47.0.0", optional = false }
|
||||||
arrow-array = "47.0"
|
arrow-array = "47.0"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ name = "lancedb"
|
|||||||
version = "0.3.2"
|
version = "0.3.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"deprecation",
|
"deprecation",
|
||||||
"pylance==0.8.9",
|
"pylance==0.8.10",
|
||||||
"ratelimiter~=1.0",
|
"ratelimiter~=1.0",
|
||||||
"retry>=0.9.2",
|
"retry>=0.9.2",
|
||||||
"tqdm>=4.1.0",
|
"tqdm>=4.1.0",
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ fn get_index_params_builder(
|
|||||||
.map(|mt| {
|
.map(|mt| {
|
||||||
let metric_type = mt.unwrap();
|
let metric_type = mt.unwrap();
|
||||||
index_builder.metric_type(metric_type);
|
index_builder.metric_type(metric_type);
|
||||||
pq_params.metric_type = metric_type;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
let num_partitions = obj.get_opt_usize(cx, "num_partitions")?;
|
let num_partitions = obj.get_opt_usize(cx, "num_partitions")?;
|
||||||
|
|||||||
@@ -99,7 +99,11 @@ impl VectorIndexBuilder for IvfPQIndexBuilder {
|
|||||||
let ivf_params = self.ivf_params.clone().unwrap_or_default();
|
let ivf_params = self.ivf_params.clone().unwrap_or_default();
|
||||||
let pq_params = self.pq_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 {
|
fn get_replace(&self) -> bool {
|
||||||
@@ -180,7 +184,6 @@ mod tests {
|
|||||||
pq_params.max_iters = 1;
|
pq_params.max_iters = 1;
|
||||||
pq_params.num_bits = 8;
|
pq_params.num_bits = 8;
|
||||||
pq_params.num_sub_vectors = 50;
|
pq_params.num_sub_vectors = 50;
|
||||||
pq_params.metric_type = MetricType::Cosine;
|
|
||||||
pq_params.max_opq_iters = 2;
|
pq_params.max_opq_iters = 2;
|
||||||
index_builder.ivf_params(ivf_params);
|
index_builder.ivf_params(ivf_params);
|
||||||
index_builder.pq_params(pq_params);
|
index_builder.pq_params(pq_params);
|
||||||
@@ -198,7 +201,6 @@ mod tests {
|
|||||||
assert_eq!(pq_params.max_iters, 1);
|
assert_eq!(pq_params.max_iters, 1);
|
||||||
assert_eq!(pq_params.num_bits, 8);
|
assert_eq!(pq_params.num_bits, 8);
|
||||||
assert_eq!(pq_params.num_sub_vectors, 50);
|
assert_eq!(pq_params.num_sub_vectors, 50);
|
||||||
assert_eq!(pq_params.metric_type, MetricType::Cosine);
|
|
||||||
assert_eq!(pq_params.max_opq_iters, 2);
|
assert_eq!(pq_params.max_opq_iters, 2);
|
||||||
} else {
|
} else {
|
||||||
assert!(false, "Expected second stage to be pq")
|
assert!(false, "Expected second stage to be pq")
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ use lance::io::object_store::WrappingObjectStore;
|
|||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use crate::error::{Error, Result};
|
use crate::error::{Error, Result};
|
||||||
use crate::index::vector::{VectorIndexBuilder, VectorIndex};
|
use crate::index::vector::{VectorIndex, VectorIndexBuilder};
|
||||||
use crate::query::Query;
|
use crate::query::Query;
|
||||||
use crate::utils::{PatchReadParam, PatchWriteParam};
|
use crate::utils::{PatchReadParam, PatchWriteParam};
|
||||||
use crate::WriteMode;
|
use crate::WriteMode;
|
||||||
@@ -393,11 +393,12 @@ impl Table {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn load_indices(&self) -> Result<Vec<VectorIndex>> {
|
pub async fn load_indices(&self) -> Result<Vec<VectorIndex>> {
|
||||||
let (indices, mf) = futures::try_join!(
|
let (indices, mf) =
|
||||||
self.dataset.load_indices(),
|
futures::try_join!(self.dataset.load_indices(), self.dataset.latest_manifest())?;
|
||||||
self.dataset.latest_manifest()
|
Ok(indices
|
||||||
)?;
|
.iter()
|
||||||
Ok(indices.iter().map(|i| VectorIndex::new_from_format(&mf, i)).collect())
|
.map(|i| VectorIndex::new_from_format(&mf, i))
|
||||||
|
.collect())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user