提交 c2269865 编写于 作者: 走神的阿圆's avatar 走神的阿圆

fix ci and single process mode tips

上级 427e3f20
......@@ -5,7 +5,8 @@ import json
if __name__ == "__main__":
# 指定要预测的图片并生成列表[("image", img_1), ("image", img_2), ... ]
file_list = [
"../../../../docs/imgs/cat.jpg", "../../../../docs/imgs/flower.jpg"
"../../../../docs/imgs/cat.jpg",
"../../../../docs/imgs/flower.jpg"
]
files = [("image", (open(item, "rb"))) for item in file_list]
# 指定预测方法为vgg11_imagenet并发送post请求
......
......@@ -7,7 +7,8 @@ import os
if __name__ == "__main__":
# 指定要检测的图片并生成列表[("image", img_1), ("image", img_2), ... ]
file_list = [
"../../../../docs/imgs/cat.jpg", "../../../../docs/imgs/dog.jpg"
"../../../../docs/imgs/cat.jpg",
"../../../../docs/imgs/dog.jpg"
]
files = [("image", (open(item, "rb"))) for item in file_list]
# 指定检测方法为yolov3_coco2017并发送post请求
......
......@@ -344,7 +344,9 @@ class ServingCommand(BaseCommand):
with open(config_file, "r") as fp:
configs = json.load(fp)
use_multiprocess = configs.get("use_multiprocess", False)
if single_mode is True or platform.system() == "Windows":
if single_mode is True:
ServingCommand.start_single_app_with_file(configs)
elif platform.system() == "Windows":
print(
"Warning: Windows cannot use multiprocess working "
"mode, PaddleHub Serving will switch to single process mode"
......@@ -360,7 +362,9 @@ class ServingCommand(BaseCommand):
else:
print("config_file ", config_file, "not exists.")
else:
if single_mode is True or platform.system() == "Windows":
if single_mode is True:
self.start_single_app_with_args()
elif platform.system() == "Windows":
print(
"Warning: Windows cannot use multiprocess working "
"mode, PaddleHub Serving will switch to single process mode"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册