nvflare.app_opt.xgboost.histogram_based_v2.adaptors.xgb_adaptor module¶
- class XGBClientAdaptor(in_process)[source]¶
Bases:
AppAdaptor
XGBClientAdaptor specifies commonly required methods for client adaptor implementations.
Constructor of XGBClientAdaptor
- class XGBServerAdaptor(in_process)[source]¶
Bases:
AppAdaptor
XGBServerAdaptor specifies commonly required methods for server adaptor implementations.
- abstract 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
- abstract 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
- abstract 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
- abstract 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