From b17e0232296aac19ae3e36f959fce20c42067137 Mon Sep 17 00:00:00 2001 From: guru4elephant Date: Sun, 22 Mar 2020 16:49:20 +0800 Subject: [PATCH] remove multiprocess queue --- python/paddle_serving_client/__init__.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/python/paddle_serving_client/__init__.py b/python/paddle_serving_client/__init__.py index 92b16c70..d70e4374 100644 --- a/python/paddle_serving_client/__init__.py +++ b/python/paddle_serving_client/__init__.py @@ -142,9 +142,6 @@ class Client(object): self.client_handle_.create_predictor_by_desc(sdk_desc.SerializeToString( )) - self.producers = [Queue() for ep in endpoints] - self.consumer = Queue() - def get_feed_names(self): return self.feed_names_ @@ -196,21 +193,20 @@ class Client(object): "fetch names should not be empty or out of saved fetch list") return {} - for feed_i in feed_batch: + for i, feed_i in enumerate(feed_batch): int_slot = [] float_slot = [] for key in feed_i: if key not in self.feed_names_: continue if self.feed_types_[key] == int_type: - if counter == 0: + if i == 0: int_feed_names.append(key) int_slot.append(feed[key]) elif self.feed_types_[key] == float_type: - if counter == 0: + if i == 0: float_feed_names.append(key) float_slot.append(feed_i[key]) - counter += 1 int_slot_batch.append(int_slot) float_slot_batch.append(float_slot) -- GitLab