mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-05 20:26:31 +00:00
Reintroduce changing the distance from Cosine to Cosine binary quantized
This commit is contained in:
committed by
Louis Dureuil
parent
f5f173e451
commit
900e8a0d9c
@ -166,20 +166,20 @@ impl VectorStore {
|
||||
// only happens once in the life of an embedder, it's not very performances
|
||||
// sensitive.
|
||||
if quantizing && !self.quantized {
|
||||
// let writer = writer.prepare_changing_distance::<BinaryQuantizedCosine>(wtxn)?;
|
||||
// writer
|
||||
// .builder(rng)
|
||||
// .available_memory(hannoy_memory.unwrap_or(usize::MAX))
|
||||
// .progress(|step| progress.update_progress_from_hannoy(step))
|
||||
// .cancel(cancel)
|
||||
// .build(wtxn)?;
|
||||
unimplemented!("switching from quantized to non-quantized");
|
||||
let writer = writer.prepare_changing_distance::<BinaryQuantizedCosine>(wtxn)?;
|
||||
writer
|
||||
.builder(rng)
|
||||
.available_memory(hannoy_memory.unwrap_or(usize::MAX))
|
||||
// .progress(|step| progress.update_progress_from_hannoy(step))
|
||||
.cancel(cancel)
|
||||
.ef_construction(HANNOY_EF_CONSTRUCTION)
|
||||
.build::<HANNOY_M, HANNOY_M0>(wtxn)?;
|
||||
} else if writer.need_build(wtxn)? {
|
||||
writer
|
||||
.builder(rng)
|
||||
.available_memory(hannoy_memory.unwrap_or(usize::MAX))
|
||||
// .progress(|step| progress.update_progress_from_hannoy(step))
|
||||
// .cancel(cancel)
|
||||
.cancel(cancel)
|
||||
.ef_construction(HANNOY_EF_CONSTRUCTION)
|
||||
.build::<HANNOY_M, HANNOY_M0>(wtxn)?;
|
||||
} else if writer.is_empty(wtxn)? {
|
||||
|
Reference in New Issue
Block a user