Python grpc.unary_unary_rpc_method_handler() Examples
The following are 30
code examples of grpc.unary_unary_rpc_method_handler().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
grpc
, or try the search function
.
Example #1
Source File: deviceQueue_pb2_grpc.py From chirpstack-api with MIT License | 7 votes |
def add_DeviceQueueServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'Enqueue': grpc.unary_unary_rpc_method_handler( servicer.Enqueue, request_deserializer=chirpstack__api_dot_as__pb_dot_external_dot_api_dot_deviceQueue__pb2.EnqueueDeviceQueueItemRequest.FromString, response_serializer=chirpstack__api_dot_as__pb_dot_external_dot_api_dot_deviceQueue__pb2.EnqueueDeviceQueueItemResponse.SerializeToString, ), 'Flush': grpc.unary_unary_rpc_method_handler( servicer.Flush, request_deserializer=chirpstack__api_dot_as__pb_dot_external_dot_api_dot_deviceQueue__pb2.FlushDeviceQueueRequest.FromString, response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, ), 'List': grpc.unary_unary_rpc_method_handler( servicer.List, request_deserializer=chirpstack__api_dot_as__pb_dot_external_dot_api_dot_deviceQueue__pb2.ListDeviceQueueItemsRequest.FromString, response_serializer=chirpstack__api_dot_as__pb_dot_external_dot_api_dot_deviceQueue__pb2.ListDeviceQueueItemsResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'api.DeviceQueueService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) # This class is part of an EXPERIMENTAL API.
Example #2
Source File: agent_pb2_grpc.py From pcocc with GNU General Public License v3.0 | 6 votes |
def add_pcoccNodeServicer_to_server(servicer, server): rpc_method_handlers = { 'route_command': grpc.unary_unary_rpc_method_handler( servicer.route_command, request_deserializer=agent__pb2.RouteMessage.FromString, response_serializer=agent__pb2.RouteMessageResult.SerializeToString, ), 'route_stream': grpc.stream_stream_rpc_method_handler( servicer.route_stream, request_deserializer=agent__pb2.McastMessage.FromString, response_serializer=agent__pb2.RouteMessageResult.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'pcoccNode', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
Example #3
Source File: actions_pb2_grpc.py From marvin-python-toolbox with Apache License 2.0 | 6 votes |
def add_BatchActionHandlerServicer_to_server(servicer, server): rpc_method_handlers = { '_remote_execute': grpc.unary_unary_rpc_method_handler( servicer._remote_execute, request_deserializer=actions__pb2.BatchActionRequest.FromString, response_serializer=actions__pb2.BatchActionResponse.SerializeToString, ), '_remote_reload': grpc.unary_unary_rpc_method_handler( servicer._remote_reload, request_deserializer=actions__pb2.ReloadRequest.FromString, response_serializer=actions__pb2.ReloadResponse.SerializeToString, ), '_health_check': grpc.unary_unary_rpc_method_handler( servicer._health_check, request_deserializer=actions__pb2.HealthCheckRequest.FromString, response_serializer=actions__pb2.HealthCheckResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'BatchActionHandler', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
Example #4
Source File: actions_pb2_grpc.py From marvin-python-toolbox with Apache License 2.0 | 6 votes |
def add_OnlineActionHandlerServicer_to_server(servicer, server): rpc_method_handlers = { '_remote_execute': grpc.unary_unary_rpc_method_handler( servicer._remote_execute, request_deserializer=actions__pb2.OnlineActionRequest.FromString, response_serializer=actions__pb2.OnlineActionResponse.SerializeToString, ), '_remote_reload': grpc.unary_unary_rpc_method_handler( servicer._remote_reload, request_deserializer=actions__pb2.ReloadRequest.FromString, response_serializer=actions__pb2.ReloadResponse.SerializeToString, ), '_health_check': grpc.unary_unary_rpc_method_handler( servicer._health_check, request_deserializer=actions__pb2.HealthCheckRequest.FromString, response_serializer=actions__pb2.HealthCheckResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'OnlineActionHandler', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
Example #5
Source File: actions_pb2.py From marvin-python-toolbox with Apache License 2.0 | 6 votes |
def add_OnlineActionHandlerServicer_to_server(servicer, server): rpc_method_handlers = { '_remote_execute': grpc.unary_unary_rpc_method_handler( servicer._remote_execute, request_deserializer=OnlineActionRequest.FromString, response_serializer=OnlineActionResponse.SerializeToString, ), '_remote_reload': grpc.unary_unary_rpc_method_handler( servicer._remote_reload, request_deserializer=ReloadRequest.FromString, response_serializer=ReloadResponse.SerializeToString, ), '_health_check': grpc.unary_unary_rpc_method_handler( servicer._health_check, request_deserializer=HealthCheckRequest.FromString, response_serializer=HealthCheckResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'OnlineActionHandler', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
Example #6
Source File: actions_pb2.py From marvin-python-toolbox with Apache License 2.0 | 6 votes |
def add_BatchActionHandlerServicer_to_server(servicer, server): rpc_method_handlers = { '_remote_execute': grpc.unary_unary_rpc_method_handler( servicer._remote_execute, request_deserializer=BatchActionRequest.FromString, response_serializer=BatchActionResponse.SerializeToString, ), '_remote_reload': grpc.unary_unary_rpc_method_handler( servicer._remote_reload, request_deserializer=ReloadRequest.FromString, response_serializer=ReloadResponse.SerializeToString, ), '_health_check': grpc.unary_unary_rpc_method_handler( servicer._health_check, request_deserializer=HealthCheckRequest.FromString, response_serializer=HealthCheckResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'BatchActionHandler', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
Example #7
Source File: nokia_rib_api_pb2_grpc.py From SROS-grpc-services with BSD 3-Clause "New" or "Revised" License | 6 votes |
def add_RibApiServicer_to_server(servicer, server): rpc_method_handlers = { 'Modify': grpc.stream_stream_rpc_method_handler( servicer.Modify, request_deserializer=nokia__rib__api__pb2.ModifyRequest.FromString, response_serializer=nokia__rib__api__pb2.ModifyResponse.SerializeToString, ), 'GetVersion': grpc.unary_unary_rpc_method_handler( servicer.GetVersion, request_deserializer=nokia__rib__api__pb2.VersionRequest.FromString, response_serializer=nokia__rib__api__pb2.VersionResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'Nokia.SROS.RibApi', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
Example #8
Source File: geo_pb2_grpc.py From chirpstack-api with MIT License | 6 votes |
def add_GeolocationServerServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'ResolveTDOA': grpc.unary_unary_rpc_method_handler( servicer.ResolveTDOA, request_deserializer=chirpstack__api_dot_geo_dot_geo__pb2.ResolveTDOARequest.FromString, response_serializer=chirpstack__api_dot_geo_dot_geo__pb2.ResolveTDOAResponse.SerializeToString, ), 'ResolveMultiFrameTDOA': grpc.unary_unary_rpc_method_handler( servicer.ResolveMultiFrameTDOA, request_deserializer=chirpstack__api_dot_geo_dot_geo__pb2.ResolveMultiFrameTDOARequest.FromString, response_serializer=chirpstack__api_dot_geo_dot_geo__pb2.ResolveMultiFrameTDOAResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'geo.GeolocationServerService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) # This class is part of an EXPERIMENTAL API.
Example #9
Source File: model_service_pb2_grpc.py From FATE with Apache License 2.0 | 6 votes |
def add_ModelServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'publishLoad': grpc.unary_unary_rpc_method_handler( servicer.publishLoad, request_deserializer=model__service__pb2.PublishRequest.FromString, response_serializer=model__service__pb2.PublishResponse.SerializeToString, ), 'publishBind': grpc.unary_unary_rpc_method_handler( servicer.publishBind, request_deserializer=model__service__pb2.PublishRequest.FromString, response_serializer=model__service__pb2.PublishResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'com.webank.ai.fate.api.mlmodel.manager.ModelService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
Example #10
Source File: inference_service_pb2_grpc.py From FATE with Apache License 2.0 | 6 votes |
def add_InferenceServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'inference': grpc.unary_unary_rpc_method_handler( servicer.inference, request_deserializer=inference__service__pb2.InferenceMessage.FromString, response_serializer=inference__service__pb2.InferenceMessage.SerializeToString, ), 'startInferenceJob': grpc.unary_unary_rpc_method_handler( servicer.startInferenceJob, request_deserializer=inference__service__pb2.InferenceMessage.FromString, response_serializer=inference__service__pb2.InferenceMessage.SerializeToString, ), 'getInferenceResult': grpc.unary_unary_rpc_method_handler( servicer.getInferenceResult, request_deserializer=inference__service__pb2.InferenceMessage.FromString, response_serializer=inference__service__pb2.InferenceMessage.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'com.webank.ai.fate.api.serving.InferenceService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
Example #11
Source File: fate_proxy_pb2_grpc.py From FATE with Apache License 2.0 | 6 votes |
def add_DataTransferServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'push': grpc.stream_unary_rpc_method_handler( servicer.push, request_deserializer=fate__proxy__pb2.Packet.FromString, response_serializer=fate__proxy__pb2.Metadata.SerializeToString, ), 'pull': grpc.unary_stream_rpc_method_handler( servicer.pull, request_deserializer=fate__proxy__pb2.Metadata.FromString, response_serializer=fate__proxy__pb2.Packet.SerializeToString, ), 'unaryCall': grpc.unary_unary_rpc_method_handler( servicer.unaryCall, request_deserializer=fate__proxy__pb2.Packet.FromString, response_serializer=fate__proxy__pb2.Packet.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'com.webank.ai.fate.api.networking.proxy.DataTransferService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
Example #12
Source File: worldhello_pb2.py From sea with MIT License | 6 votes |
def add_GreeterServicer_to_server(servicer, server): rpc_method_handlers = { 'SayHello': grpc.unary_unary_rpc_method_handler( servicer.SayHello, request_deserializer=HelloRequest.FromString, response_serializer=HelloReply.SerializeToString, ), 'SayHelloAgain': grpc.unary_unary_rpc_method_handler( servicer.SayHelloAgain, request_deserializer=HelloRequest.FromString, response_serializer=HelloReply.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'worldhello.Greeter', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
Example #13
Source File: mocap_pb2_grpc.py From MAVSDK-Python with BSD 3-Clause "New" or "Revised" License | 6 votes |
def add_MocapServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'SetVisionPositionEstimate': grpc.unary_unary_rpc_method_handler( servicer.SetVisionPositionEstimate, request_deserializer=mocap_dot_mocap__pb2.SetVisionPositionEstimateRequest.FromString, response_serializer=mocap_dot_mocap__pb2.SetVisionPositionEstimateResponse.SerializeToString, ), 'SetAttitudePositionMocap': grpc.unary_unary_rpc_method_handler( servicer.SetAttitudePositionMocap, request_deserializer=mocap_dot_mocap__pb2.SetAttitudePositionMocapRequest.FromString, response_serializer=mocap_dot_mocap__pb2.SetAttitudePositionMocapResponse.SerializeToString, ), 'SetOdometry': grpc.unary_unary_rpc_method_handler( servicer.SetOdometry, request_deserializer=mocap_dot_mocap__pb2.SetOdometryRequest.FromString, response_serializer=mocap_dot_mocap__pb2.SetOdometryResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'mavsdk.rpc.mocap.MocapService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) # This class is part of an EXPERIMENTAL API.
Example #14
Source File: core_pb2_grpc.py From MAVSDK-Python with BSD 3-Clause "New" or "Revised" License | 6 votes |
def add_CoreServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'SubscribeConnectionState': grpc.unary_stream_rpc_method_handler( servicer.SubscribeConnectionState, request_deserializer=core_dot_core__pb2.SubscribeConnectionStateRequest.FromString, response_serializer=core_dot_core__pb2.ConnectionStateResponse.SerializeToString, ), 'ListRunningPlugins': grpc.unary_unary_rpc_method_handler( servicer.ListRunningPlugins, request_deserializer=core_dot_core__pb2.ListRunningPluginsRequest.FromString, response_serializer=core_dot_core__pb2.ListRunningPluginsResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'mavsdk.rpc.core.CoreService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) # This class is part of an EXPERIMENTAL API.
Example #15
Source File: gimbal_pb2_grpc.py From MAVSDK-Python with BSD 3-Clause "New" or "Revised" License | 6 votes |
def add_GimbalServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'SetPitchAndYaw': grpc.unary_unary_rpc_method_handler( servicer.SetPitchAndYaw, request_deserializer=gimbal_dot_gimbal__pb2.SetPitchAndYawRequest.FromString, response_serializer=gimbal_dot_gimbal__pb2.SetPitchAndYawResponse.SerializeToString, ), 'SetMode': grpc.unary_unary_rpc_method_handler( servicer.SetMode, request_deserializer=gimbal_dot_gimbal__pb2.SetModeRequest.FromString, response_serializer=gimbal_dot_gimbal__pb2.SetModeResponse.SerializeToString, ), 'SetRoiLocation': grpc.unary_unary_rpc_method_handler( servicer.SetRoiLocation, request_deserializer=gimbal_dot_gimbal__pb2.SetRoiLocationRequest.FromString, response_serializer=gimbal_dot_gimbal__pb2.SetRoiLocationResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'mavsdk.rpc.gimbal.GimbalService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) # This class is part of an EXPERIMENTAL API.
Example #16
Source File: shell_pb2_grpc.py From MAVSDK-Python with BSD 3-Clause "New" or "Revised" License | 6 votes |
def add_ShellServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'Send': grpc.unary_unary_rpc_method_handler( servicer.Send, request_deserializer=shell_dot_shell__pb2.SendRequest.FromString, response_serializer=shell_dot_shell__pb2.SendResponse.SerializeToString, ), 'SubscribeReceive': grpc.unary_stream_rpc_method_handler( servicer.SubscribeReceive, request_deserializer=shell_dot_shell__pb2.SubscribeReceiveRequest.FromString, response_serializer=shell_dot_shell__pb2.ReceiveResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'mavsdk.rpc.shell.ShellService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) # This class is part of an EXPERIMENTAL API.
Example #17
Source File: endpoint_pb2_grpc.py From iroha-python with Apache License 2.0 | 6 votes |
def add_QueryService_v1Servicer_to_server(servicer, server): rpc_method_handlers = { 'Find': grpc.unary_unary_rpc_method_handler( servicer.Find, request_deserializer=queries__pb2.Query.FromString, response_serializer=qry__responses__pb2.QueryResponse.SerializeToString, ), 'FetchCommits': grpc.unary_stream_rpc_method_handler( servicer.FetchCommits, request_deserializer=queries__pb2.BlocksQuery.FromString, response_serializer=qry__responses__pb2.BlockQueryResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'iroha.protocol.QueryService_v1', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
Example #18
Source File: log_files_pb2_grpc.py From MAVSDK-Python with BSD 3-Clause "New" or "Revised" License | 6 votes |
def add_LogFilesServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'GetEntries': grpc.unary_unary_rpc_method_handler( servicer.GetEntries, request_deserializer=log__files_dot_log__files__pb2.GetEntriesRequest.FromString, response_serializer=log__files_dot_log__files__pb2.GetEntriesResponse.SerializeToString, ), 'SubscribeDownloadLogFile': grpc.unary_stream_rpc_method_handler( servicer.SubscribeDownloadLogFile, request_deserializer=log__files_dot_log__files__pb2.SubscribeDownloadLogFileRequest.FromString, response_serializer=log__files_dot_log__files__pb2.DownloadLogFileResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'mavsdk.rpc.log_files.LogFilesService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) # This class is part of an EXPERIMENTAL API.
Example #19
Source File: worldhello_pb2_grpc.py From sea with MIT License | 6 votes |
def add_GreeterServicer_to_server(servicer, server): rpc_method_handlers = { 'SayHello': grpc.unary_unary_rpc_method_handler( servicer.SayHello, request_deserializer=worldhello__pb2.HelloRequest.FromString, response_serializer=worldhello__pb2.HelloReply.SerializeToString, ), 'SayHelloAgain': grpc.unary_unary_rpc_method_handler( servicer.SayHelloAgain, request_deserializer=worldhello__pb2.HelloRequest.FromString, response_serializer=worldhello__pb2.HelloReply.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'worldhello.Greeter', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
Example #20
Source File: prediction_service_pb2.py From sagemaker-python-sdk with Apache License 2.0 | 5 votes |
def add_PredictionServiceServicer_to_server(servicer, server): rpc_method_handlers = { "Classify": grpc.unary_unary_rpc_method_handler( servicer.Classify, request_deserializer=tensorflow__serving_dot_apis_dot_classification__pb2.ClassificationRequest.FromString, response_serializer=tensorflow__serving_dot_apis_dot_classification__pb2.ClassificationResponse.SerializeToString, ), "Regress": grpc.unary_unary_rpc_method_handler( servicer.Regress, request_deserializer=tensorflow__serving_dot_apis_dot_regression__pb2.RegressionRequest.FromString, response_serializer=tensorflow__serving_dot_apis_dot_regression__pb2.RegressionResponse.SerializeToString, ), "Predict": grpc.unary_unary_rpc_method_handler( servicer.Predict, request_deserializer=tensorflow__serving_dot_apis_dot_predict__pb2.PredictRequest.FromString, response_serializer=tensorflow__serving_dot_apis_dot_predict__pb2.PredictResponse.SerializeToString, ), "MultiInference": grpc.unary_unary_rpc_method_handler( servicer.MultiInference, request_deserializer=tensorflow__serving_dot_apis_dot_inference__pb2.MultiInferenceRequest.FromString, response_serializer=tensorflow__serving_dot_apis_dot_inference__pb2.MultiInferenceResponse.SerializeToString, ), "GetModelMetadata": grpc.unary_unary_rpc_method_handler( servicer.GetModelMetadata, request_deserializer=tensorflow__serving_dot_apis_dot_get__model__metadata__pb2.GetModelMetadataRequest.FromString, response_serializer=tensorflow__serving_dot_apis_dot_get__model__metadata__pb2.GetModelMetadataResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( "tensorflow.serving.PredictionService", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,))
Example #21
Source File: stan_pb2_grpc.py From python-sensor with MIT License | 5 votes |
def add_StanServicer_to_server(servicer, server): rpc_method_handlers = { 'OneQuestionOneResponse': grpc.unary_unary_rpc_method_handler( servicer.OneQuestionOneResponse, request_deserializer=stan__pb2.QuestionRequest.FromString, response_serializer=stan__pb2.QuestionResponse.SerializeToString, ), 'ManyQuestionsOneResponse': grpc.stream_unary_rpc_method_handler( servicer.ManyQuestionsOneResponse, request_deserializer=stan__pb2.QuestionRequest.FromString, response_serializer=stan__pb2.QuestionResponse.SerializeToString, ), 'OneQuestionManyResponses': grpc.unary_stream_rpc_method_handler( servicer.OneQuestionManyResponses, request_deserializer=stan__pb2.QuestionRequest.FromString, response_serializer=stan__pb2.QuestionResponse.SerializeToString, ), 'ManyQuestionsManyReponses': grpc.stream_stream_rpc_method_handler( servicer.ManyQuestionsManyReponses, request_deserializer=stan__pb2.QuestionRequest.FromString, response_serializer=stan__pb2.QuestionResponse.SerializeToString, ), 'OneQuestionOneErrorResponse': grpc.unary_unary_rpc_method_handler( servicer.OneQuestionOneErrorResponse, request_deserializer=stan__pb2.QuestionRequest.FromString, response_serializer=stan__pb2.QuestionResponse.SerializeToString, ), 'OneErroredQuestionOneResponse': grpc.unary_unary_rpc_method_handler( servicer.OneErroredQuestionOneResponse, request_deserializer=stan__pb2.QuestionRequest.FromString, response_serializer=stan__pb2.QuestionResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'stan.Stan', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
Example #22
Source File: hetr_pb2_grpc.py From ngraph-python with Apache License 2.0 | 5 votes |
def add_HetrServicer_to_server(servicer, server): rpc_method_handlers = { 'BuildTransformer': grpc.unary_unary_rpc_method_handler( servicer.BuildTransformer, request_deserializer=ngraph_dot_transformers_dot_hetr_dot_hetr__pb2.BuildTransformerRequest.FromString, response_serializer=ngraph_dot_transformers_dot_hetr_dot_hetr__pb2.BuildTransformerReply.SerializeToString, ), 'CloseTransformer': grpc.unary_unary_rpc_method_handler( servicer.CloseTransformer, request_deserializer=ngraph_dot_transformers_dot_hetr_dot_hetr__pb2.CloseTransformerRequest.FromString, response_serializer=ngraph_dot_transformers_dot_hetr_dot_hetr__pb2.CloseTransformerReply.SerializeToString, ), 'Computation': grpc.stream_unary_rpc_method_handler( servicer.Computation, request_deserializer=ngraph_dot_transformers_dot_hetr_dot_hetr__pb2.ComputationRequest.FromString, response_serializer=ngraph_dot_transformers_dot_hetr_dot_hetr__pb2.ComputationReply.SerializeToString, ), 'FeedInput': grpc.unary_unary_rpc_method_handler( servicer.FeedInput, request_deserializer=ngraph_dot_transformers_dot_hetr_dot_hetr__pb2.FeedInputRequest.FromString, response_serializer=ngraph_dot_transformers_dot_hetr_dot_hetr__pb2.FeedInputReply.SerializeToString, ), 'GetResults': grpc.unary_unary_rpc_method_handler( servicer.GetResults, request_deserializer=ngraph_dot_transformers_dot_hetr_dot_hetr__pb2.GetResultsRequest.FromString, response_serializer=ngraph_dot_transformers_dot_hetr_dot_hetr__pb2.GetResultsReply.SerializeToString, ), 'Close': grpc.unary_unary_rpc_method_handler( servicer.Close, request_deserializer=ngraph_dot_transformers_dot_hetr_dot_hetr__pb2.CloseRequest.FromString, response_serializer=ngraph_dot_transformers_dot_hetr_dot_hetr__pb2.CloseReply.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'Hetr', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
Example #23
Source File: hetr_pb2.py From ngraph-python with Apache License 2.0 | 5 votes |
def add_HetrServicer_to_server(servicer, server): rpc_method_handlers = { 'BuildTransformer': grpc.unary_unary_rpc_method_handler( servicer.BuildTransformer, request_deserializer=BuildTransformerRequest.FromString, response_serializer=BuildTransformerReply.SerializeToString, ), 'CloseTransformer': grpc.unary_unary_rpc_method_handler( servicer.CloseTransformer, request_deserializer=CloseTransformerRequest.FromString, response_serializer=CloseTransformerReply.SerializeToString, ), 'Computation': grpc.stream_unary_rpc_method_handler( servicer.Computation, request_deserializer=ComputationRequest.FromString, response_serializer=ComputationReply.SerializeToString, ), 'FeedInput': grpc.unary_unary_rpc_method_handler( servicer.FeedInput, request_deserializer=FeedInputRequest.FromString, response_serializer=FeedInputReply.SerializeToString, ), 'GetResults': grpc.unary_unary_rpc_method_handler( servicer.GetResults, request_deserializer=GetResultsRequest.FromString, response_serializer=GetResultsReply.SerializeToString, ), 'Close': grpc.unary_unary_rpc_method_handler( servicer.Close, request_deserializer=CloseRequest.FromString, response_serializer=CloseReply.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'Hetr', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
Example #24
Source File: nlm_pb2_grpc.py From NLM with MIT License | 5 votes |
def add_NLMServicer_to_server(servicer, server): rpc_method_handlers = { 'StrRecall': grpc.unary_unary_rpc_method_handler( servicer.StrRecall, request_deserializer=nlm__pb2.RawString.FromString, response_serializer=nlm__pb2.GraphOutput.SerializeToString, ), 'NLURecall': grpc.unary_unary_rpc_method_handler( servicer.NLURecall, request_deserializer=nlm__pb2.NLMInput.FromString, response_serializer=nlm__pb2.GraphOutput.SerializeToString, ), 'NodeRecall': grpc.unary_unary_rpc_method_handler( servicer.NodeRecall, request_deserializer=nlm__pb2.GraphNode.FromString, response_serializer=nlm__pb2.GraphNode.SerializeToString, ), 'RelationRecall': grpc.unary_unary_rpc_method_handler( servicer.RelationRecall, request_deserializer=nlm__pb2.GraphRelation.FromString, response_serializer=nlm__pb2.GraphRelation.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'nlm.NLM', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
Example #25
Source File: model_service_pb2.py From sagemaker-python-sdk with Apache License 2.0 | 5 votes |
def add_ModelServiceServicer_to_server(servicer, server): rpc_method_handlers = { "GetModelStatus": grpc.unary_unary_rpc_method_handler( servicer.GetModelStatus, request_deserializer=tensorflow__serving_dot_apis_dot_get__model__status__pb2.GetModelStatusRequest.FromString, response_serializer=tensorflow__serving_dot_apis_dot_get__model__status__pb2.GetModelStatusResponse.SerializeToString, ) } generic_handler = grpc.method_handlers_generic_handler( "tensorflow.serving.ModelService", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,))
Example #26
Source File: model_service_pb2_grpc.py From Gather-Deployment with MIT License | 5 votes |
def add_ModelServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'GetModelStatus': grpc.unary_unary_rpc_method_handler( servicer.GetModelStatus, request_deserializer=tensorflow__serving_dot_apis_dot_get__model__status__pb2.GetModelStatusRequest.FromString, response_serializer=tensorflow__serving_dot_apis_dot_get__model__status__pb2.GetModelStatusResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'tensorflow.serving.ModelService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
Example #27
Source File: model_service_pb2_grpc.py From sagemaker-python-sdk with Apache License 2.0 | 5 votes |
def add_ModelServiceServicer_to_server(servicer, server): rpc_method_handlers = { "GetModelStatus": grpc.unary_unary_rpc_method_handler( servicer.GetModelStatus, request_deserializer=tensorflow__serving_dot_apis_dot_get__model__status__pb2.GetModelStatusRequest.FromString, response_serializer=tensorflow__serving_dot_apis_dot_get__model__status__pb2.GetModelStatusResponse.SerializeToString, ) } generic_handler = grpc.method_handlers_generic_handler( "tensorflow.serving.ModelService", rpc_method_handlers ) server.add_generic_rpc_handlers((generic_handler,))
Example #28
Source File: helloworld_pb2_grpc.py From grpclib with BSD 3-Clause "New" or "Revised" License | 5 votes |
def add_GreeterServicer_to_server(servicer, server): rpc_method_handlers = { 'SayHello': grpc.unary_unary_rpc_method_handler( servicer.SayHello, request_deserializer=helloworld_dot_helloworld__pb2.HelloRequest.FromString, response_serializer=helloworld_dot_helloworld__pb2.HelloReply.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'helloworld.Greeter', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) # This class is part of an EXPERIMENTAL API.
Example #29
Source File: prediction_service_pb2.py From Gather-Deployment with MIT License | 5 votes |
def add_PredictionServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'Classify': grpc.unary_unary_rpc_method_handler( servicer.Classify, request_deserializer=tensorflow__serving_dot_apis_dot_classification__pb2.ClassificationRequest.FromString, response_serializer=tensorflow__serving_dot_apis_dot_classification__pb2.ClassificationResponse.SerializeToString, ), 'Regress': grpc.unary_unary_rpc_method_handler( servicer.Regress, request_deserializer=tensorflow__serving_dot_apis_dot_regression__pb2.RegressionRequest.FromString, response_serializer=tensorflow__serving_dot_apis_dot_regression__pb2.RegressionResponse.SerializeToString, ), 'Predict': grpc.unary_unary_rpc_method_handler( servicer.Predict, request_deserializer=tensorflow__serving_dot_apis_dot_predict__pb2.PredictRequest.FromString, response_serializer=tensorflow__serving_dot_apis_dot_predict__pb2.PredictResponse.SerializeToString, ), 'MultiInference': grpc.unary_unary_rpc_method_handler( servicer.MultiInference, request_deserializer=tensorflow__serving_dot_apis_dot_inference__pb2.MultiInferenceRequest.FromString, response_serializer=tensorflow__serving_dot_apis_dot_inference__pb2.MultiInferenceResponse.SerializeToString, ), 'GetModelMetadata': grpc.unary_unary_rpc_method_handler( servicer.GetModelMetadata, request_deserializer=tensorflow__serving_dot_apis_dot_get__model__metadata__pb2.GetModelMetadataRequest.FromString, response_serializer=tensorflow__serving_dot_apis_dot_get__model__metadata__pb2.GetModelMetadataResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'tensorflow.serving.PredictionService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))
Example #30
Source File: model_service_pb2.py From Gather-Deployment with MIT License | 5 votes |
def add_ModelServiceServicer_to_server(servicer, server): rpc_method_handlers = { 'GetModelStatus': grpc.unary_unary_rpc_method_handler( servicer.GetModelStatus, request_deserializer=tensorflow__serving_dot_apis_dot_get__model__status__pb2.GetModelStatusRequest.FromString, response_serializer=tensorflow__serving_dot_apis_dot_get__model__status__pb2.GetModelStatusResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'tensorflow.serving.ModelService', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,))