feat(新功能):
fix(修复bug): 关闭调试日志打印 docs(文档变更): refactor(重构): test(增加测试):
This commit is contained in:
@@ -58,7 +58,7 @@ class Segmentation:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def load_seg_result(image_id):
|
def load_seg_result(image_id):
|
||||||
file_path = f"seg_cache/{image_id}.npy"
|
file_path = f"seg_cache/{image_id}.npy"
|
||||||
logger.info(f"load seg file name is :{SEG_CACHE_PATH}{image_id}.npy")
|
# logger.info(f"load seg file name is :{SEG_CACHE_PATH}{image_id}.npy")
|
||||||
try:
|
try:
|
||||||
seg_result = np.load(file_path)
|
seg_result = np.load(file_path)
|
||||||
return True, seg_result
|
return True, seg_result
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ def design_generate_v2(request_data):
|
|||||||
'Connection': "keep-alive",
|
'Connection': "keep-alive",
|
||||||
'Content-Type': "application/json"
|
'Content-Type': "application/json"
|
||||||
}
|
}
|
||||||
logger.info(items_response)
|
# logger.info(items_response)
|
||||||
response = post_request(url, json_data=items_response, headers=headers)
|
response = post_request(url, json_data=items_response, headers=headers)
|
||||||
if response:
|
if response:
|
||||||
# 打印结果
|
# 打印结果
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ class Segmentation:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def load_seg_result(image_id):
|
def load_seg_result(image_id):
|
||||||
file_path = f"{SEG_CACHE_PATH}{image_id}.npy"
|
file_path = f"{SEG_CACHE_PATH}{image_id}.npy"
|
||||||
logger.info(f"load seg file name is :{SEG_CACHE_PATH}{image_id}.npy")
|
# logger.info(f"load seg file name is :{SEG_CACHE_PATH}{image_id}.npy")
|
||||||
try:
|
try:
|
||||||
seg_result = np.load(file_path)
|
seg_result = np.load(file_path)
|
||||||
return True, seg_result
|
return True, seg_result
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ def ClassCallRunTime(func):
|
|||||||
end_time = time.time()
|
end_time = time.time()
|
||||||
execution_time = end_time - start_time
|
execution_time = end_time - start_time
|
||||||
class_name = args[0].__class__.__name__ # 获取类名
|
class_name = args[0].__class__.__name__ # 获取类名
|
||||||
print(f"class name: {class_name} , run time is : {execution_time} s")
|
if execution_time > 0.05:
|
||||||
|
logging.info(f"class name: {class_name} , run time is : {execution_time} s")
|
||||||
return result
|
return result
|
||||||
|
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|||||||
Reference in New Issue
Block a user