src.Projections.Python.Transformer.ProjectionTransformer module¶
-
class
src.Projections.Python.Transformer.ProjectionTransformer.
ProjectionTransformer
¶ Bases:
src.Projections.Python.Transformer.Transformer.Transformer
The Transformer
- Parameters
t (Transformer) – General interface for transformers
-
checkIfAbort
(count)¶ Check if the transformer should be aborter
- Parameters
count (int) – How many points have been processed
- Returns
Whether abort or not
- Return type
bool
-
clearVariables
()¶ Clear all variables
-
getProgress
(request, context)¶ Implementation for the getProgress gRPC requset
- Parameters
request (gRPC) – standard gRPC (contains the messages)
context (gRPC) – standard gRPC
- Returns
contains the integer of current progress
- Return type
grPC progressKNN
-
startTransformerService
(request, context)¶ Starts projecting the points
- Parameters
request (gRPC) – standard gRPC (contains the messages)
context (gRPC) – standard gRPC
- Yields
pointChunk – gRPC messages containing the list of projected points
-
stopTransformerService
(request, context)¶ Stop the current service
- Parameters
request (gRPC) – standard gRPC (contains the messages)
context (gRPC) – standard gRPC
- Returns
grPC void
-
transformAndToGRPC
(buffer)¶ Transform and create the gRPC messages
- Parameters
buffer ([hdvector]) – The list of the actual word vectors in
- Returns
list of points to be returned to main applications
- Return type
-
updatePercentage
()¶ Recalculate the current percentage
-
src.Projections.Python.Transformer.ProjectionTransformer.
printMessage
(message)¶ Print the coloured message so that we can see in the output which microservice printed it
- Parameters
message (string) – The actual message
-
src.Projections.Python.Transformer.ProjectionTransformer.
serveServer
()¶ Setup the GRPC server