mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 23:25:25 +03:00
Always use CPU for searching
This commit is contained in:
parent
9ab6bf0603
commit
514716807a
@ -1,3 +1,32 @@
|
|||||||
# Embeddings
|
# Embeddings
|
||||||
chromadb == 0.5.0
|
chromadb == 0.5.0
|
||||||
onnx_clip == 4.0.*
|
onnx_clip == 4.0.*
|
||||||
|
|
||||||
|
# chromadb dependencies
|
||||||
|
bcrypt>=4.0.1
|
||||||
|
chroma-hnswlib==0.7.6
|
||||||
|
fastapi>=0.95.2
|
||||||
|
graphlib_backport==1.0.3; python_version < '3.9'
|
||||||
|
grpcio>=1.58.0
|
||||||
|
httpx>=0.27.0
|
||||||
|
importlib-resources
|
||||||
|
kubernetes>=28.1.0
|
||||||
|
mmh3>=4.0.1
|
||||||
|
numpy>=1.22.5, <2.0.0
|
||||||
|
opentelemetry-api>=1.2.0
|
||||||
|
opentelemetry-exporter-otlp-proto-grpc>=1.24.0
|
||||||
|
opentelemetry-instrumentation-fastapi>=0.41b0
|
||||||
|
opentelemetry-sdk>=1.2.0
|
||||||
|
orjson>=3.9.12, < 3.10.6 # 3.10.7 is currently missing a wheel for x86 glibc
|
||||||
|
overrides>=7.3.1
|
||||||
|
posthog>=2.4.0
|
||||||
|
pydantic>=1.9
|
||||||
|
pypika>=0.48.9
|
||||||
|
PyYAML>=6.0.0
|
||||||
|
rich>=10.11.0
|
||||||
|
tenacity>=8.2.3
|
||||||
|
tokenizers>=0.13.2
|
||||||
|
tqdm>=4.65.0
|
||||||
|
typer>=0.9.0
|
||||||
|
typing_extensions>=4.5.0
|
||||||
|
uvicorn[standard]>=0.18.3
|
||||||
|
|||||||
@ -85,7 +85,10 @@ class Embeddings:
|
|||||||
@property
|
@property
|
||||||
def description(self) -> Collection:
|
def description(self) -> Collection:
|
||||||
return self.client.get_or_create_collection(
|
return self.client.get_or_create_collection(
|
||||||
name="event_description", embedding_function=MiniLMEmbedding()
|
name="event_description",
|
||||||
|
embedding_function=MiniLMEmbedding(
|
||||||
|
preferred_providers=["CPUExecutionProvider"]
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
def reindex(self) -> None:
|
def reindex(self) -> None:
|
||||||
|
|||||||
@ -69,7 +69,9 @@ class Clip(OnnxClip):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
return ort.InferenceSession(path, providers=providers, options=options)
|
return ort.InferenceSession(
|
||||||
|
path, providers=providers, provider_options=options
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
raise FileNotFoundError(
|
raise FileNotFoundError(
|
||||||
errno.ENOENT,
|
errno.ENOENT,
|
||||||
@ -101,7 +103,7 @@ class Clip(OnnxClip):
|
|||||||
# Finally move the temporary file to the correct location
|
# Finally move the temporary file to the correct location
|
||||||
temporary_filename.rename(path)
|
temporary_filename.rename(path)
|
||||||
return ort.InferenceSession(
|
return ort.InferenceSession(
|
||||||
path, providers=provider, provider_options=optionsm
|
path, providers=provider, provider_options=options
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user