Bump arroy to v0.2.0

This commit is contained in:
Clément Renault 2024-01-16 16:45:55 +01:00
parent cfaa522d68
commit 01e2c3d6bb
No known key found for this signature in database
GPG Key ID: F250A4C4E3AE5F5F
5 changed files with 8 additions and 11 deletions

5
Cargo.lock generated
View File

@ -384,8 +384,9 @@ dependencies = [
[[package]] [[package]]
name = "arroy" name = "arroy"
version = "0.1.0" version = "0.2.0"
source = "git+https://github.com/meilisearch/arroy.git#d372648212e561a4845077cdb9239423d78655a2" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "efddeb1e7c32a551cc07ef4c3e181e3cd5478fdaf4f0bd799983171c1f6efe57"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"byteorder", "byteorder",

View File

@ -89,7 +89,7 @@ reqwest = { version = "0.11.23", features = [
], default-features = false } ], default-features = false }
tiktoken-rs = "0.5.8" tiktoken-rs = "0.5.8"
liquid = "0.26.4" liquid = "0.26.4"
arroy = { git = "https://github.com/meilisearch/arroy.git", version = "0.1.0" } arroy = "0.2.0"
rand = "0.8.5" rand = "0.8.5"
[dev-dependencies] [dev-dependencies]

View File

@ -251,6 +251,7 @@ impl From<arroy::Error> for Error {
arroy::Error::DatabaseFull arroy::Error::DatabaseFull
| arroy::Error::InvalidItemAppend | arroy::Error::InvalidItemAppend
| arroy::Error::UnmatchingDistance { .. } | arroy::Error::UnmatchingDistance { .. }
| arroy::Error::MissingNode
| arroy::Error::MissingMetadata => { | arroy::Error::MissingMetadata => {
Error::InternalError(InternalError::ArroyError(value)) Error::InternalError(InternalError::ArroyError(value))
} }

View File

@ -522,12 +522,8 @@ where
pool.install(|| { pool.install(|| {
let writer_index = (embedder_index as u16) << 8; let writer_index = (embedder_index as u16) << 8;
for k in 0..=u8::MAX { for k in 0..=u8::MAX {
let writer = arroy::Writer::prepare( let writer =
wtxn, arroy::Writer::new(vector_arroy, writer_index | (k as u16), dimension)?;
vector_arroy,
writer_index | (k as u16),
dimension,
)?;
if writer.is_empty(wtxn)? { if writer.is_empty(wtxn)? {
break; break;
} }

View File

@ -372,8 +372,7 @@ pub(crate) fn write_typed_chunk_into_index(
// FIXME: allow customizing distance // FIXME: allow customizing distance
let writers: std::result::Result<Vec<_>, _> = (0..=u8::MAX) let writers: std::result::Result<Vec<_>, _> = (0..=u8::MAX)
.map(|k| { .map(|k| {
arroy::Writer::prepare( arroy::Writer::new(
wtxn,
index.vector_arroy, index.vector_arroy,
writer_index | (k as u16), writer_index | (k as u16),
expected_dimension, expected_dimension,