提交 68dc5899 编写于 作者: B barrierye

exit when an exception occurs when init client in op

上级 77b69f1e
......@@ -321,15 +321,16 @@ class Op(object):
log = get_log_func(op_info_prefix)
tid = threading.current_thread().ident
# create client based on client_type
client = self.init_client(client_type, self._client_config,
self._server_endpoints, self._fetch_names)
client = None
client_predict_handler = None
if self.with_serving:
client_predict_handler = client.predict
# load user resources
try:
# create client based on client_type
client = self.init_client(client_type, self._client_config,
self._server_endpoints, self._fetch_names)
if client is not None:
client_predict_handler = client.predict
# load user resources
self.load_user_resources()
except Exception as e:
_LOGGER.error(log(e))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册