update faiss compare

This commit is contained in:
yichuan520030910320
2025-07-25 01:45:50 -07:00
parent f8b5c97190
commit 52153bbb69
3 changed files with 4 additions and 4 deletions

View File

@@ -37,7 +37,7 @@ def main():
import faiss
except ImportError:
print("Faiss is not installed.")
print("Please install it with `uv pip install faiss-cpu`")
print("Please install it with `uv pip install faiss-cpu` and you can then run this script again")
sys.exit(1)
from llama_index.core import (

View File

@@ -92,8 +92,8 @@ class HNSWBuilder(LeannBackendBuilderInterface):
if success:
logger.info("✅ CSR conversion successful.")
index_file_old = index_file.with_suffix(".old")
shutil.move(str(index_file), str(index_file_old))
# index_file_old = index_file.with_suffix(".old")
# shutil.move(str(index_file), str(index_file_old))
shutil.move(str(csr_temp_file), str(index_file))
logger.info(
f"INFO: Replaced original index with {mode_str} version at '{index_file}'"