Raymw / Federated-XGBoost

Federated Learning on XGBoost
Apache License 2.0
46 stars 20 forks source link

How to get parameters #3

Open meijuanwang opened 4 years ago

meijuanwang commented 4 years ago

Hi, I have a few questions about this project. I have read the paper, in the local node ,we need return the parameters. I didn't find the code of geting parameters. Did I miss something?

Raymw commented 4 years ago

Hi, I use the Rabit for parameter passing which is built in XGBoost distributed mode, and I think this is more efficient than doing the parameter passing from scratch. However, in that paper, I aggregated those Gradients and Hessians locally for each client. So when communicating information between clients about best split point and the value of Gain during the process of training, only the aggregated value will be transmitted for calculating the Gain. Thanks !

meijuanwang commented 4 years ago

Hi, Thank you for your answer. As I ubderstand it , the sever can get the passing parameter through Rabit, when rank=1, does it mean the server get new parameters? Sorry, I don't know much about Rabit. Thanks

Raymw commented 4 years ago

Yes but the communication part has been implemented inside the XGBoost. Cuz the Rabit is invested by the group of XGBoost and they have done a good optimization in the distributed mode. You can see more details if you check the code of the original XGBoost package. Thanks !

meijuanwang commented 4 years ago

Hi, In "readme" ,you mentioned set two nodes (num-workers =2) locally to simulate the experiments, if I use more than two nodes , I need to set two situations: rank=0 and rank>0 . Is that right? Have you tried this experiments in two machines? Thanks!

Raymw commented 4 years ago

yeh you can try more nodes and this is similar to MPI. And you can either reference rabit or MPI document for more details.