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
Update quickstart-pytorch example to use app
model
#3116
Changes from 9 commits
e935ae8
13207b1
e73acef
ac65c28
0e9d916
c625575
7387175
e4d65e0
fb65b67
0c8e0cb
72337c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,8 @@ Write the command below in your terminal to install the dependencies according t | |
pip install -r requirements.txt | ||
``` | ||
|
||
______________________________________________________________________ | ||
|
||
## Run Federated Learning with PyTorch 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: | ||
|
@@ -72,3 +74,41 @@ python3 client.py --partition-id 1 | |
``` | ||
|
||
You will see that PyTorch is starting a federated training. Look at the [code](https://github.com/adap/flower/tree/main/examples/quickstart-pytorch) for a detailed explanation. | ||
|
||
______________________________________________________________________ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove? (also those in #3117?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure. I don't have a strong opinion about this |
||
|
||
## Run Federated Learning with PyTorch and `Flower Next` | ||
|
||
### 1. Start the long-running Flower server (SuperLink) | ||
|
||
```bash | ||
flower-superlink --insecure | ||
``` | ||
|
||
### 2. Start the long-running Flower clients (SuperNodes) | ||
|
||
Start 2 long-running Flower clients in 2 separate terminal windows, using: | ||
|
||
```bash | ||
flower-client-app client:app --insecure | ||
``` | ||
|
||
### 3. Run the Flower App | ||
|
||
With both the long-running server (SuperLink) and two clients (SuperNode) up and running, we can now run the actual Flower App: | ||
|
||
```bash | ||
flower-server-app server:app --insecure | ||
``` | ||
|
||
Or, to try the workflow example, run: | ||
|
||
```bash | ||
flower-server-app server_workflow:app --insecure | ||
``` | ||
|
||
Or, to try the custom server function example, run: | ||
|
||
```bash | ||
flower-server-app server_custom:app --insecure | ||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was only relevant for the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah! I see. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
flwr>=1.0, <2.0 | ||
flwr>=1.8.0, <2.0 | ||
flwr-datasets[vision]>=0.0.2, <1.0.0 | ||
torch==2.1.1 | ||
torchvision==0.16.1 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking we could remove these, since the immediately below section title will introduce one already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure.