mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-29 18:17:40 +03:00
Ignore unused impor
t
This commit is contained in:
parent
fa2e628337
commit
abe28e93a6
@ -55,7 +55,7 @@ def ensure_torch_dependencies() -> bool:
|
|||||||
stderr=subprocess.DEVNULL,
|
stderr=subprocess.DEVNULL,
|
||||||
)
|
)
|
||||||
|
|
||||||
import torch
|
import torch # type: ignore # noqa: F401
|
||||||
|
|
||||||
logger.info("PyTorch installed successfully")
|
logger.info("PyTorch installed successfully")
|
||||||
return True
|
return True
|
||||||
@ -132,7 +132,7 @@ def convert_onnx_to_rknn(
|
|||||||
config["target_platform"] = soc
|
config["target_platform"] = soc
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from rknn.api import RKNN
|
from rknn.api import RKNN # type: ignore
|
||||||
|
|
||||||
logger.info(f"Converting {onnx_path} to RKNN format for {soc}")
|
logger.info(f"Converting {onnx_path} to RKNN format for {soc}")
|
||||||
rknn = RKNN(verbose=True)
|
rknn = RKNN(verbose=True)
|
||||||
@ -299,7 +299,7 @@ def wait_for_conversion_completion(
|
|||||||
|
|
||||||
# Check if lock is stale
|
# Check if lock is stale
|
||||||
if is_lock_stale(lock_file_path):
|
if is_lock_stale(lock_file_path):
|
||||||
logger.warning(f"Lock file is stale, attempting to clean up and retry...")
|
logger.warning("Lock file is stale, attempting to clean up and retry...")
|
||||||
cleanup_stale_lock(lock_file_path)
|
cleanup_stale_lock(lock_file_path)
|
||||||
# Try to acquire lock again
|
# Try to acquire lock again
|
||||||
if acquire_conversion_lock(lock_file_path, timeout=60):
|
if acquire_conversion_lock(lock_file_path, timeout=60):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user