未验证 提交 0701b1c2 编写于 作者: 走神的阿圆's avatar 走神的阿圆 提交者: GitHub

fix bug of serving (#1042)

上级 4e22e2b8
......@@ -166,7 +166,7 @@ class ServingCommand:
'''
Start one PaddleHub-Serving instance by arguments with gunicorn.
'''
module = self.args.modules
module = self.modules_info
if module is not None:
port = self.args.port
if is_port_occupied("127.0.0.1", port) is True:
......@@ -209,7 +209,7 @@ class ServingCommand:
'''
Start one PaddleHub-Serving instance by arguments with flask.
'''
module = self.args.modules
module = self.modules_info
if module is not None:
port = self.args.port
if is_port_occupied("127.0.0.1", port) is True:
......
......@@ -87,7 +87,7 @@ def predict_v2(module_info: dict, input: dict):
output = serving_method(**predict_args)
except Exception as err:
log.logger.error(traceback.format_exc())
return package_result("101", err, "")
return package_result("101", str(err), "")
return package_result("000", "", output)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册