fix: build with direct embedding
This commit is contained in:
@@ -141,6 +141,14 @@ class HNSWSearcher(BaseSearcher):
|
||||
raise RuntimeError("Index is pruned but recompute is disabled.")
|
||||
|
||||
self._index = faiss.read_index(str(index_file), faiss.IO_FLAG_MMAP, hnsw_config)
|
||||
|
||||
# Load label mapping
|
||||
label_map_file = self.index_dir / "leann.labels.map"
|
||||
if not label_map_file.exists():
|
||||
raise FileNotFoundError(f"Label map file not found at {label_map_file}")
|
||||
|
||||
with open(label_map_file, "rb") as f:
|
||||
self.label_map = pickle.load(f)
|
||||
|
||||
def search(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user