mirror of
https://github.com/immich-app/immich.git
synced 2025-06-07 23:54:50 -04:00
make these functions snake case.
This commit is contained in:
parent
f5de3de163
commit
be76857ae6
@ -31,7 +31,7 @@ except (FileNotFoundError, ImportError):
|
|||||||
soc_name = None
|
soc_name = None
|
||||||
|
|
||||||
|
|
||||||
def initRKNN(rknnModel, id) -> RKNNLite:
|
def init_rknn(rknnModel, id) -> RKNNLite:
|
||||||
if not is_available:
|
if not is_available:
|
||||||
raise RuntimeError("rknn is not available!")
|
raise RuntimeError("rknn is not available!")
|
||||||
rknn_lite = RKNNLite()
|
rknn_lite = RKNNLite()
|
||||||
@ -59,10 +59,10 @@ def initRKNN(rknnModel, id) -> RKNNLite:
|
|||||||
return rknn_lite
|
return rknn_lite
|
||||||
|
|
||||||
|
|
||||||
def initRKNNs(rknnModel, tpes) -> list[RKNNLite]:
|
def init_rknns(rknnModel, tpes) -> list[RKNNLite]:
|
||||||
rknn_list = []
|
rknn_list = []
|
||||||
for i in range(tpes):
|
for i in range(tpes):
|
||||||
rknn_list.append(initRKNN(rknnModel, i % 3))
|
rknn_list.append(init_rknn(rknnModel, i % 3))
|
||||||
return rknn_list
|
return rknn_list
|
||||||
|
|
||||||
|
|
||||||
@ -70,7 +70,7 @@ class RknnPoolExecutor:
|
|||||||
def __init__(self, rknnModel: str, tpes: int, func):
|
def __init__(self, rknnModel: str, tpes: int, func):
|
||||||
self.tpes = tpes
|
self.tpes = tpes
|
||||||
self.queue = Queue()
|
self.queue = Queue()
|
||||||
self.rknn_pool = initRKNNs(rknnModel, tpes)
|
self.rknn_pool = init_rknns(rknnModel, tpes)
|
||||||
self.pool = ThreadPoolExecutor(max_workers=tpes)
|
self.pool = ThreadPoolExecutor(max_workers=tpes)
|
||||||
self.func = func
|
self.func = func
|
||||||
self.num = 0
|
self.num = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user