Skip to content

Commit 1f394f1

Browse files
refactor(examples): Update quickstart-xgboost app (#6288)
Co-authored-by: jafermarq <javier@flower.ai>
1 parent 934c3a2 commit 1f394f1

File tree

8 files changed

+15
-10
lines changed

8 files changed

+15
-10
lines changed

examples/docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
"pytorch-from-centralized-to-federated": "index.html",
7777
"flower-via-docker-compose": "index.html",
7878
"quickstart-sklearn-tabular": "quickstart-sklearn.html",
79+
"xgboost-quickstart": "quickstart-xgboost.html",
7980
}
8081

8182

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ This will create a new directory called `quickstart-xgboost` with the following
3232

3333
```shell
3434
quickstart-xgboost
35-
├── xgboost_quickstart
35+
├── quickstart_xgboost
3636
│ ├── __init__.py
3737
│ ├── client_app.py # Defines your ClientApp
3838
│ ├── server_app.py # Defines your ServerApp
@@ -43,7 +43,7 @@ quickstart-xgboost
4343

4444
### Install dependencies and project
4545

46-
Install the dependencies defined in `pyproject.toml` as well as the `xgboost_quickstart` package.
46+
Install the dependencies defined in `pyproject.toml` as well as the `quickstart_xgboost` package.
4747

4848
```bash
4949
pip install -e .

examples/xgboost-quickstart/pyproject.toml renamed to examples/quickstart-xgboost/pyproject.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ packages = ["."]
2020
publisher = "flwrlabs"
2121

2222
[tool.flwr.app.components]
23-
serverapp = "xgboost_quickstart.server_app:app"
24-
clientapp = "xgboost_quickstart.client_app:app"
23+
serverapp = "quickstart_xgboost.server_app:app"
24+
clientapp = "quickstart_xgboost.client_app:app"
2525

2626
[tool.flwr.app.config]
2727
num-server-rounds = 3
@@ -44,3 +44,7 @@ default = "local-simulation"
4444

4545
[tool.flwr.federations.local-simulation]
4646
options.num-supernodes = 20
47+
48+
[tool.flwr.federations.supergrid-deployment]
49+
address = "supergrid.flower.ai"
50+
enable-account-auth = true
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""quickstart-xgboost: A Flower / XGBoost app."""

examples/xgboost-quickstart/xgboost_quickstart/client_app.py renamed to examples/quickstart-xgboost/quickstart_xgboost/client_app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""xgboost_quickstart: A Flower / XGBoost app."""
1+
"""quickstart-xgboost: A Flower / XGBoost app."""
22

33
import warnings
44

@@ -8,7 +8,7 @@
88
from flwr.clientapp import ClientApp
99
from flwr.common.config import unflatten_dict
1010

11-
from xgboost_quickstart.task import load_data, replace_keys
11+
from quickstart_xgboost.task import load_data, replace_keys
1212

1313
warnings.filterwarnings("ignore", category=UserWarning)
1414

examples/xgboost-quickstart/xgboost_quickstart/server_app.py renamed to examples/quickstart-xgboost/quickstart_xgboost/server_app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""xgboost_quickstart: A Flower / XGBoost app."""
1+
"""quickstart_xgboost: A Flower / XGBoost app."""
22

33
import numpy as np
44
import xgboost as xgb
@@ -7,7 +7,7 @@
77
from flwr.serverapp import Grid, ServerApp
88
from flwr.serverapp.strategy import FedXgbBagging
99

10-
from xgboost_quickstart.task import replace_keys
10+
from quickstart_xgboost.task import replace_keys
1111

1212
# Create ServerApp
1313
app = ServerApp()

examples/xgboost-quickstart/xgboost_quickstart/task.py renamed to examples/quickstart-xgboost/quickstart_xgboost/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""xgboost_quickstart: A Flower / XGBoost app."""
1+
"""quickstart_xgboost: A Flower / XGBoost app."""
22

33
import xgboost as xgb
44
from flwr_datasets import FederatedDataset

examples/xgboost-quickstart/xgboost_quickstart/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)