gnes.proto package

Module contents

class gnes.proto.RequestGenerator[source]

Bases: object

static index(data: List[bytes], batch_size: int = 0, doc_type: int = 1, doc_id_start: int = 0, request_id_start: int = 0, random_doc_id: bool = False, *args, **kwargs)[source]
static query(query: bytes, top_k: int, request_id_start: int = 0, doc_type: int = 1, *args, **kwargs)[source]
static train(data: List[bytes], batch_size: int = 0, doc_type: int = 1, doc_id_start: int = 0, request_id_start: int = 0, random_doc_id: bool = False, *args, **kwargs)[source]
gnes.proto.send_message(sock: zmq.sugar.socket.Socket, msg: gnes_pb2.Message, timeout: int = -1) → None[source]
gnes.proto.recv_message(sock: zmq.sugar.socket.Socket, timeout: int = -1) → Optional[gnes_pb2.Message][source]
gnes.proto.blob2array(blob: gnes_pb2.NdArray) → numpy.ndarray[source]

Convert a blob proto to an array.

gnes.proto.array2blob(x: numpy.ndarray) → gnes_pb2.NdArray[source]

Converts a N-dimensional array to blob proto.

gnes.proto.add_route(evlp: gnes_pb2.Envelope, name: str)[source]