Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
fix(preprocessor): fix preprocessor service handler function name error
Browse files Browse the repository at this point in the history
  • Loading branch information
felix committed Jul 17, 2019
1 parent 1229f5c commit 3836020
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gnes/service/preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 3836020

Please sign in to comment.