mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 07:35:27 +03:00
Formatting
This commit is contained in:
parent
dca1776334
commit
d78daf84de
@ -23,12 +23,8 @@ class SqliteVecQueueDatabase(SqliteQueueDatabase):
|
||||
|
||||
def delete_embeddings_thumbnail(self, event_ids: list[str]) -> None:
|
||||
ids = ",".join(["?" for _ in event_ids])
|
||||
self.execute_sql(
|
||||
f"DELETE FROM vec_thumbnails WHERE id IN ({ids})", event_ids
|
||||
)
|
||||
self.execute_sql(f"DELETE FROM vec_thumbnails WHERE id IN ({ids})", event_ids)
|
||||
|
||||
def delete_embeddings_description(self, event_ids: list[str]) -> None:
|
||||
ids = ",".join(["?" for _ in event_ids])
|
||||
self.execute_sql(
|
||||
f"DELETE FROM vec_descriptions WHERE id IN ({ids})", event_ids
|
||||
)
|
||||
self.execute_sql(f"DELETE FROM vec_descriptions WHERE id IN ({ids})", event_ids)
|
||||
|
||||
@ -345,7 +345,9 @@ def generate_color_palette(n):
|
||||
return colors
|
||||
|
||||
|
||||
def serialize(vector: Union[list[float], np.ndarray, float], pack: bool = True) -> bytes:
|
||||
def serialize(
|
||||
vector: Union[list[float], np.ndarray, float], pack: bool = True
|
||||
) -> bytes:
|
||||
"""Serializes a list of floats, numpy array, or single float into a compact "raw bytes" format"""
|
||||
if isinstance(vector, np.ndarray):
|
||||
# Convert numpy array to list of floats
|
||||
|
||||
Loading…
Reference in New Issue
Block a user