提交 b97dfe44 编写于 作者: H HexToString

fix config bug

上级 9d1e4533
......@@ -555,7 +555,14 @@ class MultiLangClient(object):
)
resp = self.stub_.GetClientConfig(get_client_config_req)
model_config_path_list = resp.client_config_str_list
self._parse_model_config(model_config_path_list)
file_path_list = []
for single_model_config in model_config_path_list:
if os.path.isdir(single_model_config):
file_path_list.append("{}/serving_server_conf.prototxt".format(
single_model_config))
elif os.path.isfile(single_model_config):
file_path_list.append(single_model_config)
self._parse_model_config(file_path_list)
def _flatten_list(self, nested_list):
for item in nested_list:
......
......@@ -36,8 +36,11 @@ class MultiLangServerServiceServicer(multi_lang_general_model_service_pb2_grpc.
def _init_bclient(self, model_config_path_list, endpoints, timeout_ms=None):
file_path_list = []
for single_model_config in model_config_path_list:
file_path_list.append("{}/serving_server_conf.prototxt".format(
single_model_config))
if os.path.isdir(single_model_config):
file_path_list.append("{}/serving_server_conf.prototxt".format(
single_model_config))
elif os.path.isfile(single_model_config):
file_path_list.append(single_model_config)
from paddle_serving_client import Client
self.bclient_ = Client()
if timeout_ms is not None:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册