From 3836020aca4dbf9d3a650ca8c75907c2803db477 Mon Sep 17 00:00:00 2001 From: felix Date: Wed, 17 Jul 2019 17:53:00 +0800 Subject: [PATCH] fix(preprocessor): fix preprocessor service handler function name error --- gnes/service/preprocessor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnes/service/preprocessor.py b/gnes/service/preprocessor.py index 50f2ecce..fb98c294 100644 --- a/gnes/service/preprocessor.py +++ b/gnes/service/preprocessor.py @@ -27,15 +27,15 @@ def post_init(self): self._model = self.load_model(BasePreprocessor) @handler.register(gnes_pb2.Request.TrainRequest) - def _handler_train_index(self, msg: 'gnes_pb2.Message'): + def _handler_train(self, msg: 'gnes_pb2.Message'): for d in msg.request.train.docs: self._model.apply(d) @handler.register(gnes_pb2.Request.IndexRequest) - def _handler_train_index(self, msg: 'gnes_pb2.Message'): + def _handler_index(self, msg: 'gnes_pb2.Message'): for d in msg.request.index.docs: self._model.apply(d) @handler.register(gnes_pb2.Request.QueryRequest) - def _handler_train_index(self, msg: 'gnes_pb2.Message'): + def _handler_query(self, msg: 'gnes_pb2.Message'): self._model.apply(msg.request.search.query)