From 348b87ba8573be840bed5ca3bf46c46510ed3805 Mon Sep 17 00:00:00 2001 From: barrierye Date: Thu, 18 Jun 2020 10:03:47 +0800 Subject: [PATCH] update code --- python/paddle_serving_client/__init__.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/python/paddle_serving_client/__init__.py b/python/paddle_serving_client/__init__.py index 58ae09bc..5c0ed287 100644 --- a/python/paddle_serving_client/__init__.py +++ b/python/paddle_serving_client/__init__.py @@ -390,8 +390,18 @@ class MultiLangClient(object): raise Exception("GClient only supports multi-model temporarily") self._parse_model_config(path) - def connect(self, endpoint): - self.channel_ = grpc.insecure_channel(endpoint[0]) #TODO + def add_variant(self, tag, cluster, variant_weight): + # TODO + pass + + def set_rpc_timeout_ms(self, rpc_timeout): + # TODO + pass + + def connect(self, endpoints): + g_endpoint = [(endpoint.spilt(':')[0], endpoint.split(':')[1]) + for endpoint in endpoints] + self.channel_ = grpc.insecure_channel(g_endpoint) self.stub_ = multi_lang_general_model_service_pb2_grpc.MultiLangGeneralModelServiceStub( self.channel_) -- GitLab