forked from Github/frigate
Chroma fixes (#13902)
* Ensure descriptions saved in chroma are non-empty * delete only existing ids in event cleanup * add debug logging
This commit is contained in:
@@ -230,7 +230,15 @@ class EventCleanup(threading.Thread):
|
||||
Event.delete().where(Event.id << chunk).execute()
|
||||
|
||||
if self.config.semantic_search.enabled:
|
||||
self.embeddings.thumbnail.delete(ids=chunk)
|
||||
self.embeddings.description.delete(ids=chunk)
|
||||
for collection in [
|
||||
self.embeddings.thumbnail,
|
||||
self.embeddings.description,
|
||||
]:
|
||||
existing_ids = collection.get(ids=chunk, include=[])["ids"]
|
||||
if existing_ids:
|
||||
collection.delete(ids=existing_ids)
|
||||
logger.debug(
|
||||
f"Deleted {len(existing_ids)} embeddings from {collection.__class__.__name__}"
|
||||
)
|
||||
|
||||
logger.info("Exiting event cleanup...")
|
||||
|
||||
Reference in New Issue
Block a user