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

Update quickstart-pytorch example to use app model #3116

Merged
merged 11 commits into from Apr 2, 2024

Conversation

tabdar-khan
Copy link
Contributor

Issue

quickstart-pytorch example is outdated as it is not using the new app model from Flower Next.

Description

  • Updated the client.py and server.py files in the quickstart-pytorch example to use the new app model.
  • Refactored some of the imports as well

Changelog entry

Update quickstart-pytorch example to use app model

Copy link
Contributor

@jafermarq jafermarq left a comment

Choose a reason for hiding this comment

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

Hey @tabdar-khan , I added some small changes to the code that were needed to keep things consistent w/ and w/o Flower Next. Let me know what you think

Comment on lines 104 to 114
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
```
Copy link
Contributor

Choose a reason for hiding this comment

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

This was only relevant for the exampes/app-pytorch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah! I see.

Comment on lines +50 to +51
______________________________________________________________________

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure.

@@ -72,3 +74,29 @@ 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.

______________________________________________________________________
Copy link
Contributor

Choose a reason for hiding this comment

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

remove? (also those in #3117?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. I don't have a strong opinion about this

@jafermarq jafermarq merged commit 972d0c8 into main Apr 2, 2024
28 checks passed
@jafermarq jafermarq deleted the tabdar/update-quickstart-pytorch branch April 2, 2024 15:41
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.

None yet

3 participants