diff --git a/python/paddle_serving_client/__init__.py b/python/paddle_serving_client/__init__.py index 88ee74a642775a4b2c890bd4e736c2deee368734..c0fae83b402c2e66cc058ee92379f504d9680cfd 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 efb84b564bc4bc3a16435f4f1423398fd23f3aa4..21b64117c869f238b9f3e1b6969e2900b332b614 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())