chore: upgrade lance to 0.8.1 (#536)

Bump to lance 0.8.1 for both javascript and python sdk
This commit is contained in:
Lei Xu
2023-10-03 14:29:18 -07:00
committed by GitHub
parent e4c3a9346c
commit 8b815ef5a8
4 changed files with 9 additions and 13 deletions

View File

@@ -5,8 +5,8 @@ exclude = ["python"]
resolver = "2"
[workspace.dependencies]
lance = { "version" = "=0.7.5", "features" = ["dynamodb"] }
lance-linalg = { "version" = "=0.7.5" }
lance = { "version" = "=0.8.1", "features" = ["dynamodb"] }
lance-linalg = { "version" = "=0.8.1" }
# Note that this one does not include pyarrow
arrow = { version = "43.0.0", optional = false }
arrow-array = "43.0"

View File

@@ -2,7 +2,7 @@
name = "lancedb"
version = "0.2.6"
dependencies = [
"pylance==0.8.0",
"pylance==0.8.1",
"ratelimiter~=1.0",
"retry>=0.9.2",
"tqdm>=4.1.0",

View File

@@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use lance::index::vector::ivf::IvfBuildParams;
use lance::index::vector::pq::PQBuildParams;
use lance::index::vector::{ivf::IvfBuildParams, pq::PQBuildParams};
use lance_linalg::distance::MetricType;
use neon::context::FunctionContext;
use neon::prelude::*;
@@ -79,11 +78,9 @@ fn get_index_params_builder(
num_partitions.map(|np| {
let max_iters = max_iters.unwrap_or(50);
let ivf_params = IvfBuildParams {
num_partitions: np,
max_iters,
centroids: None,
};
let mut ivf_params = IvfBuildParams::default();
ivf_params.num_partitions = np;
ivf_params.max_iters = max_iters;
index_builder.ivf_params(ivf_params)
});

View File

@@ -190,9 +190,8 @@ impl Table {
pub async fn create_index(&mut self, index_builder: &impl VectorIndexBuilder) -> Result<()> {
use lance::index::DatasetIndexExt;
let dataset = self
.dataset
.create_index(
let mut dataset = self.dataset.as_ref().clone();
dataset.create_index(
&[index_builder
.get_column()
.unwrap_or(VECTOR_COLUMN_NAME.to_string())