nvflare.app_opt.xgboost.histogram_based_v2.adaptors.grpc_server_adaptor module¶
- class GrpcServerAdaptor(int_client_grpc_options=None, xgb_server_ready_timeout=10.0, in_process=True)[source]¶
Bases:
XGBServerAdaptor
- all_gather(rank: int, seq: int, send_buf: bytes, fl_ctx: FLContext) bytes [source]¶
Called by the XGB Controller to perform Allgather operation, per XGBoost spec.
- Parameters:
rank – rank of the calling client
seq – sequence number of the request
send_buf – operation input data
fl_ctx – FL context
Returns: operation result
- all_gather_v(rank: int, seq: int, send_buf: bytes, fl_ctx: FLContext) bytes [source]¶
Called by the XGB Controller to perform AllgatherV operation, per XGBoost spec.
- Parameters:
rank – rank of the calling client
seq – sequence number of the request
send_buf – input data
fl_ctx – FL context
Returns: operation result
- all_reduce(rank: int, seq: int, data_type: int, reduce_op: int, send_buf: bytes, fl_ctx: FLContext) bytes [source]¶
Called by the XGB Controller to perform Allreduce operation, per XGBoost spec.
- Parameters:
rank – rank of the calling client
seq – sequence number of the request
data_type – data type of the input
reduce_op – reduce operation to be performed
send_buf – input data
fl_ctx – FL context
Returns: operation result
- broadcast(rank: int, seq: int, root: int, send_buf: bytes, fl_ctx: FLContext) bytes [source]¶
Called by the XGB Controller to perform Broadcast operation, per XGBoost spec.
- Parameters:
rank – rank of the calling client
seq – sequence number of the request
root – root rank of the broadcast
send_buf – input data
fl_ctx – FL context
Returns: operation result