Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New XGBoost strategy: cyclic training #2666

Merged
merged 7 commits into from
Dec 6, 2023
Merged

New XGBoost strategy: cyclic training #2666

merged 7 commits into from
Dec 6, 2023

Conversation

yan-gao-GY
Copy link
Contributor

Issue

Description

The exiting bagging strategy for XGBoost cannot perform client-by-client (cyclic) training, although cyclic training is a popular FL fashion.

Proposal

This PR achieves cyclic training with two steps:

  • Override the sample() method of client_manager() to fix the order of selected clients
  • Create a new strategy fedxgb_cyclic, and override configure_fit() and configure_evaluate() to do sequential client selection.

This way, there is only one single client selected to participate in the training per round with the fashion of client1-server-client2-server-clientN.
The trained local XGBoost trees will be passed to the next client as an initialised model for next round's boosting.

Copy link
Member

@charlesbvll charlesbvll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be good to add some details about the difference between bagging and cyclic, and/or why a user would prefer to use one over the other. Otherwise it looks good!

src/py/flwr/server/strategy/fedxgb_cyclic.py Outdated Show resolved Hide resolved
src/py/flwr/server/strategy/fedxgb_cyclic.py Outdated Show resolved Hide resolved
@yan-gao-GY
Copy link
Contributor Author

@charlesbvll thanks for your suggestion and error-catch! I have offered an explanation of bagging and cyclic in readme in the later PR. The docstring has been updated.

charlesbvll
charlesbvll previously approved these changes Dec 5, 2023
@danieljanes danieljanes merged commit 5be6671 into main Dec 6, 2023
27 checks passed
@danieljanes danieljanes deleted the xgboost-cyclic branch December 6, 2023 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants