feat 代码整理
fix
This commit is contained in:
@@ -5,7 +5,7 @@ from pymilvus import MilvusClient
|
|||||||
|
|
||||||
from app.core.config import *
|
from app.core.config import *
|
||||||
from app.service.design_fast.utils.design_ensemble import get_keypoint_result
|
from app.service.design_fast.utils.design_ensemble import get_keypoint_result
|
||||||
from app.service.utils.decorator import ClassCallRunTime
|
from app.service.utils.decorator import ClassCallRunTime, RunTime
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ class KeyPoint:
|
|||||||
logger.info(f"save keypoint cache milvus error : {e}")
|
logger.info(f"save keypoint cache milvus error : {e}")
|
||||||
return dict(zip(KEYPOINT_RESULT_TABLE_FIELD_SET, result.reshape(12, 2).astype(int).tolist()))
|
return dict(zip(KEYPOINT_RESULT_TABLE_FIELD_SET, result.reshape(12, 2).astype(int).tolist()))
|
||||||
|
|
||||||
# @ RunTime
|
@RunTime
|
||||||
def keypoint_cache(self, result, site):
|
def keypoint_cache(self, result, site):
|
||||||
try:
|
try:
|
||||||
client = MilvusClient(uri=MILVUS_URL, token=MILVUS_TOKEN, db_name=MILVUS_ALIAS)
|
client = MilvusClient(uri=MILVUS_URL, token=MILVUS_TOKEN, db_name=MILVUS_ALIAS)
|
||||||
|
|||||||
Reference in New Issue
Block a user