nvflare.app_opt.xgboost.histogram_based_v2.sender module¶
- class Sender(engine, timeout)[source]¶
Bases:
object
A Sender is used to send XGB requests from the client to the server and wait for reply. TBD: currently the sender simply sends the request with an aux message. It will be enhanced to be more reliable in dealing with unstable network.
Constructor
- Parameters:
engine – the client engine that can send aux messages
timeout – the timeout for XGB requests
- send_to_server(op: str, req: Shareable, abort_signal: Signal)[source]¶
Send an XGB request to the server.
- Parameters:
op – the XGB operation code
req – the XGB request
abort_signal – used for checking whether the job is aborted.
Returns: reply from the server
Note: when this method is enhanced to be more reliable, we’ll keep resending until either the request is sent successfully or the job is aborted.