add workaround code

This commit is contained in:
yichuan520030910320
2025-07-07 23:13:47 +00:00
parent 6fc57eb48e
commit 637dab379e
6 changed files with 98 additions and 8 deletions

View File

@@ -143,6 +143,9 @@ class HNSWBuilder(LeannBackendBuilderInterface):
if success:
print("✅ CSR conversion successful.")
import shutil
# rename index_file to 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))
print(f"INFO: Replaced original index with {mode_str} version at '{index_file}'")
else: