diff --git a/examples/quickstart-xgboost/README.md b/examples/quickstart-xgboost/README.md index dad8814ece08..f7b98c11d3b5 100644 --- a/examples/quickstart-xgboost/README.md +++ b/examples/quickstart-xgboost/README.md @@ -52,24 +52,36 @@ pip install -r requirements.txt ## Run Federated Learning with XGBoost and Flower -Afterwards you are ready to start the Flower server as well as the clients. You can simply start the server in a terminal as follows: +Afterwards you are ready to start the Flower server as well as the clients. +You can simply start the server in a terminal as follows: ```shell python3 server.py ``` -Now you are ready to start the Flower clients which will participate in the learning. To do so simply open two more terminal windows and run the following commands. +Now you are ready to start the Flower clients which will participate in the learning. +To do so simply open two more terminal windows and run the following commands. Start client 1 in the first terminal: ```shell -python3 client.py +python3 client.py partition_id=0 ``` Start client 2 in the second terminal: ```shell -python3 client.py +python3 client.py partition_id=1 ``` -You will see that XGBoost is starting a federated training. Look at the [code](https://github.com/adap/flower/tree/main/examples/quickstart-xgboost) and [tutorial](https://flower.dev/docs/framework/tutorial-quickstart-xgboost.html) for a detailed explanation. +You will see that XGBoost is starting a federated training. + +Alternatively, you can use `run.sh` to run the same experiment in a single terminal as follows: + +```shell +bash run.sh +``` + +Besides, we provide options to customise the experimental settings, including data partitioning and centralised/distributed evaluation (see `utils.py`). +Look at the [code](https://github.com/adap/flower/tree/main/examples/quickstart-xgboost) +and [tutorial](https://flower.dev/docs/framework/tutorial-quickstart-xgboost.html) for a detailed explanation. diff --git a/examples/quickstart-xgboost/run.sh b/examples/quickstart-xgboost/run.sh index f7d37f47051a..92e9973fdb5f 100755 --- a/examples/quickstart-xgboost/run.sh +++ b/examples/quickstart-xgboost/run.sh @@ -4,7 +4,7 @@ cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/ echo "Starting server" python server.py & -sleep 3 # Sleep for 3s to give the server enough time to start +sleep 15 # Sleep for 15s to give the server enough time to start for i in `seq 0 1`; do echo "Starting client $i"