gnes.router.reduce.doc_sum module

class gnes.router.reduce.doc_sum.DocSumRouter(*args, **kwargs)[source]

Bases: gnes.router.base.BaseReduceRouter

apply(msg: gnes_pb2.Message, accum_msgs: List[gnes_pb2.Message], *args, **kwargs)[source]

Modify the current message based on accumulated messages

Parameters:
  • msg – the current message
  • accum_msgs – accumulated messages
train(*args, **kwargs)

Train the model, need to be overrided