nvflare.app_opt.xgboost.histogram_based_v2.adaptors.grpc_client_adaptor module¶
- class GrpcClientAdaptor(int_server_grpc_options=None, in_process=True, per_msg_timeout=10.0, tx_timeout=100.0)[source]¶
Bases:
XGBClientAdaptor
,FederatedServicer
Implementation of XGBClientAdaptor that uses an internal GrpcServer.
The GrpcClientAdaptor class serves as an interface between the XGBoost federated client and federated server components. It employs its XGBRunner to initiate an XGBoost federated gRPC client and utilizes an internal GrpcServer to forward client requests/responses.
- The communication flow is as follows:
XGBoost federated gRPC client talks to GrpcClientAdaptor, which encapsulates a GrpcServer. Requests are then forwarded to GrpcServerAdaptor, which internally manages a GrpcClient responsible for interacting with the XGBoost federated gRPC server.
XGBoost federated gRPC server talks to GrpcServerAdaptor, which encapsulates a GrpcClient. Responses are then forwarded to GrpcClientAdaptor, which internally manages a GrpcServer responsible for interacting with the XGBoost federated gRPC client.
Constructor method to initialize the object.
- Parameters:
int_server_grpc_options – An optional list of key-value pairs (channel_arguments in gRPC Core runtime) to configure the gRPC channel of internal GrpcServer.
in_process (bool) – Specifies whether to start the XGBRunner in the same process or not.
- Allgather(request: AllgatherRequest, context)[source]¶
Missing associated documentation comment in .proto file.
- AllgatherV(request: AllgatherVRequest, context)[source]¶
Missing associated documentation comment in .proto file.
- Allreduce(request: AllreduceRequest, context)[source]¶
Missing associated documentation comment in .proto file.
- Broadcast(request: BroadcastRequest, context)[source]¶
Missing associated documentation comment in .proto file.
- initialize(fl_ctx: FLContext)[source]¶
Called by the Controller/Executor to initialize the adaptor.
- Parameters:
fl_ctx – the FL context
Returns: None