From a83f12544e3a7dab7a40c35b43632bc1ccef718d Mon Sep 17 00:00:00 2001 From: guru4elephant Date: Sun, 16 Feb 2020 20:32:45 +0800 Subject: [PATCH] try to add general response op, and first add python side --- python/paddle_serving_server/__init__.py | 15 +++++++++------ python/paddle_serving_server_gpu/__init__.py | 11 +++++++---- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/python/paddle_serving_server/__init__.py b/python/paddle_serving_server/__init__.py index 458a3da5..f8cf66d7 100644 --- a/python/paddle_serving_server/__init__.py +++ b/python/paddle_serving_server/__init__.py @@ -23,12 +23,15 @@ from version import serving_server_version class OpMaker(object): def __init__(self): - self.op_dict = {"general_infer":"GeneralInferOp", - "general_text_infer":"GeneralTextInferOp", - "general_reader":"GeneralReaderOp", - "general_text_reader":"GeneralTextReaderOp", - "general_single_kv":"GeneralSingleKVOp", - "general_dist_kv":"GeneralDistKVOp"} + self.op_dict = { + "general_infer":"GeneralInferOp", + "general_reader":"GeneralReaderOp", + "general_response":"GeneralResponseOp", + "general_text_reader":"GeneralTextReaderOp", + "general_text_response":"GeneralTextResponseOp", + "general_single_kv":"GeneralSingleKVOp", + "general_dist_kv":"GeneralDistKVOp" + } # currently, inputs and outputs are not used # when we have OpGraphMaker, inputs and outputs are necessary diff --git a/python/paddle_serving_server_gpu/__init__.py b/python/paddle_serving_server_gpu/__init__.py index a5b584ba..65abb672 100644 --- a/python/paddle_serving_server_gpu/__init__.py +++ b/python/paddle_serving_server_gpu/__init__.py @@ -24,10 +24,13 @@ from version import serving_server_version class OpMaker(object): def __init__(self): self.op_dict = { - "general_infer": "GeneralInferOp", - "general_reader": "GeneralReaderOp", - "general_single_kv": "GeneralSingleKVOp", - "general_dist_kv": "GeneralDistKVOp" + "general_infer":"GeneralInferOp", + "general_reader":"GeneralReaderOp", + "general_response":"GeneralResponseOp", + "general_text_reader":"GeneralTextReaderOp", + "general_text_response":"GeneralTextResponseOp", + "general_single_kv":"GeneralSingleKVOp", + "general_dist_kv":"GeneralDistKVOp" } # currently, inputs and outputs are not used -- GitLab