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

Add MLX quickstart example #2693

Merged
merged 14 commits into from
Dec 8, 2023
Merged

Add MLX quickstart example #2693

merged 14 commits into from
Dec 8, 2023

Conversation

charlesbvll
Copy link
Member

Issue

Description

MLX is a NumPy-like array framework designed for efficient and flexible machine learning on Apple silicon. We do not have an example for it.

Related issues/PRs

N/A

Proposal

Explanation

Add a new quickstart-mlx example for using MLX with Flower.

Checklist

  • Implement proposed change
  • Make CI checks pass
  • Ping maintainers on Slack (channel #contributions)

Any other comments?

N/A

@charlesbvll charlesbvll marked this pull request as ready for review December 7, 2023 14:19
@jafermarq jafermarq added the Examples Add or update a Flower example label Dec 7, 2023
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.

This is great!!

I thought we could use flwr-datasets 😇

The README.md will also need to be update to show that clients need to pass the --client-id.

examples/quickstart-mlx/client.py Show resolved Hide resolved
examples/quickstart-mlx/client.py Outdated Show resolved Hide resolved
examples/quickstart-mlx/client.py Outdated Show resolved Hide resolved
examples/quickstart-mlx/pyproject.toml Show resolved Hide resolved
charlesbvll and others added 7 commits December 7, 2023 23:10
Co-authored-by: Javier <jafermarq@users.noreply.github.com>
Co-authored-by: Javier <jafermarq@users.noreply.github.com>
Co-authored-by: Javier <jafermarq@users.noreply.github.com>
Co-authored-by: Javier <jafermarq@users.noreply.github.com>
return loss.item(), len(self.test_images), {"accuracy": accuracy.item()}


if __name__ == "__main__":
Copy link
Member

Choose a reason for hiding this comment

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

Let's put the following code in a main function

@danieljanes danieljanes merged commit e584c6d into main Dec 8, 2023
27 checks passed
@danieljanes danieljanes deleted the add-mlx-example branch December 8, 2023 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Examples Add or update a Flower example
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants