From bda62c76f1fbb41fec00e177d87bb29cd68ecedb Mon Sep 17 00:00:00 2001 From: guru4elephant Date: Tue, 11 Feb 2020 20:03:51 +0800 Subject: [PATCH] fix create predictor by desc bug --- python/paddle_serving_client/__init__.py | 2 +- python/paddle_serving_client/io/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/paddle_serving_client/__init__.py b/python/paddle_serving_client/__init__.py index 88ee74a6..c0fae83b 100644 --- a/python/paddle_serving_client/__init__.py +++ b/python/paddle_serving_client/__init__.py @@ -105,7 +105,7 @@ class Client(object): predictor_sdk.set_server_endpoints(endpoints) sdk_desc = predictor_sdk.gen_desc() timestamp = time.asctime(time.localtime(time.time())) - self.client_handle_.create_predictor(sdk_desc) + self.client_handle_.create_predictor_by_desc(sdk_desc) def get_feed_names(self): return self.feed_names_ diff --git a/python/paddle_serving_client/io/__init__.py b/python/paddle_serving_client/io/__init__.py index efb84b56..21b64117 100644 --- a/python/paddle_serving_client/io/__init__.py +++ b/python/paddle_serving_client/io/__init__.py @@ -80,9 +80,9 @@ def save_model(server_model_folder, with open("{}/serving_server_conf.prototxt".format(server_model_folder), "w") as fout: fout.write(str(config)) with open("{}/serving_client_conf.stream.prototxt".format(client_config_folder), "wb") as fout: - fout.write(config.serialize_to_string()) + fout.write(config.SerializeToString()) with open("{}/serving_server_conf.stream.prototxt".format(server_model_folder), "wb") as fout: - fout.write(config.serialize_to_string()) + fout.write(config.SerializeToString()) -- GitLab