Skip to content

Commit

Permalink
make snapshots optional
Browse files Browse the repository at this point in the history
  • Loading branch information
nicola-corbellini committed Sep 22, 2023
1 parent 5982b28 commit bec88e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ CORE_PORT=1865
# Log levels
LOG_LEVEL=WARNING

# Turn off memory collections' snapshots on embeddder change
# Turn off memory collections' snapshots on embedder change
SAVE_MEMORY_SNAPSHOTS=false
3 changes: 1 addition & 2 deletions core/cat/memory/vector_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,8 @@ def check_embedding_size(self):
log.info(f'Collection "{self.collection_name}" has the same embedder')
else:
log.warning(f'Collection "{self.collection_name}" has different embedder')
# Opt-in memory snapshot saving can be turned off in the .env file with:
# Memory snapshot saving can be turned off in the .env file with:
# SAVE_MEMORY_SNAPSHOTS=false
log.critical(os.getenv("SAVE_MEMORY_SNAPSHOTS"))
if os.getenv("SAVE_MEMORY_SNAPSHOTS") == "true":
# dump collection on disk before deleting
self.save_dump()
Expand Down

0 comments on commit bec88e1

Please sign in to comment.