nvflare.app_opt.xgboost.histogram_based_v2.grpc_client module¶
- class GrpcClient(server_addr, grpc_options=None)[source]¶
Bases:
object
This class implements a gRPC XGB Client that is capable of sending XGB operations to a gRPC XGB Server.
Constructor
- Parameters:
server_addr – address of the gRPC server to connect to
grpc_options – An optional list of key-value pairs (channel_arguments in gRPC Core runtime) to configure the gRPC channel.
- send_allgather(seq_num, rank, data: bytes)[source]¶
Send Allgather request to gRPC server
- Parameters:
seq_num – sequence number
rank – rank of the client
data – the send_buf data
Returns: an AllgatherReply object; or None if processing error is encountered
- send_allgatherv(seq_num, rank, data: bytes)[source]¶
Send AllgatherV request to gRPC server
- Parameters:
seq_num – sequence number
rank – rank of the client
data – the send_buf data
Returns: an AllgatherVReply object; or None if processing error is encountered
- send_allreduce(seq_num, rank, data: bytes, data_type, reduce_op)[source]¶
Send Allreduce request to gRPC server
- Parameters:
seq_num – sequence number
rank – rank of the client
data – the send_buf data
data_type – data type of the input
reduce_op – reduce op to be performed
Returns: an AllreduceReply object; or None if processing error is encountered
- send_broadcast(seq_num, rank, data: bytes, root)[source]¶
Send Broadcast request to gRPC server
- Parameters:
seq_num – sequence number
rank – rank of the client
data – the send_buf data
root – rank of the root
Returns: a BroadcastReply object; or None if processing error is encountered