nvflare.app_opt.xgboost.histogram_based_v2.grpc.grpc_server module

class GrpcServer(addr, max_workers: int, servicer, grpc_options=None)[source]

Bases: object

This class implements a gRPC XGB Server that is capable of processing XGB operations.

Constructor

Parameters:
  • addr – the listening address of the server

  • max_workers – max number of workers

  • servicer – the servicer that is capable of processing XGB requests

  • grpc_options – An optional list of key-value pairs (channel_arguments in gRPC Core runtime) to configure the gRPC channel.

shutdown()[source]

Shut down the gRPC server gracefully.

Returns:

start(no_blocking=False)[source]

Called to start the server

Parameters:

no_blocking – whether blocking the current thread and wait for server termination

Returns: None