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

exit when an exception occurs when init client in op

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