Skip to content

Commit

Permalink
Fix quickstart-cpp example (#3275)
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesbvll authored Apr 17, 2024
1 parent 58c47b5 commit 618b8fd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 24 deletions.
16 changes: 10 additions & 6 deletions examples/quickstart-cpp/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Flower Clients in C++
# Flower Clients in C++ (under development)

In this example you will train a linear model on synthetic data using C++ clients.

Expand All @@ -12,7 +12,7 @@ Many thanks to the original contributors to this code:

## Install requirements

You'll need CMake and Python.
You'll need CMake and Python with `flwr` installed.

### Building the example

Expand All @@ -23,16 +23,20 @@ cmake -S . -B build
cmake --build build
```

## Run the server and two clients in separate terminals
## Run the `Flower SuperLink`, the two clients, and the `Flower ServerApp` in separate terminals

```bash
python server.py
flwr-superlink --insecure
```

```bash
build/flwr_client 0 127.0.0.1:8080
build/flwr_client 0 127.0.0.1:9092
```

```bash
build/flwr_client 1 127.0.0.1:8080
build/flwr_client 1 127.0.0.1:9092
```

```bash
flower-server-app server:app --insecure
```
10 changes: 0 additions & 10 deletions examples/quickstart-cpp/driver.py

This file was deleted.

8 changes: 0 additions & 8 deletions examples/quickstart-cpp/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,3 @@
config=fl.server.ServerConfig(num_rounds=3),
strategy=strategy,
)

# Start Flower server for three rounds of federated learning
if __name__ == "__main__":
fl.server.start_server(
server_address="0.0.0.0:8080",
config=fl.server.ServerConfig(num_rounds=3),
strategy=strategy,
)

0 comments on commit 618b8fd

Please sign in to comment.