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

refactor(examples) Update quickstart-mlx example #3701

Open
wants to merge 87 commits into
base: main
Choose a base branch
from

Conversation

jafermarq
Copy link
Contributor

@jafermarq jafermarq commented Jun 30, 2024

Update examples/quickstart-mlx to make it flwr run-compatible. Code generated via flwr new, then adapted to the new client_fn logic.

@jafermarq jafermarq added the Examples Add or update a Flower example label Jun 30, 2024
@jafermarq jafermarq marked this pull request as ready for review July 24, 2024 14:37
Copy link
Member

@charlesbvll charlesbvll left a comment

Choose a reason for hiding this comment

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

It looks very good! I love it! Should we add module docstrings?

@jafermarq
Copy link
Contributor Author

It looks very good! I love it! Should we add module docstrings?

ok! What would you propose? something minimal as what's generated by the templates?

@@ -129,30 +107,30 @@ data = (
test_partition["label"].astype(np.uint32),
)

train_images, train_labels, test_images, test_labels = map(mlx.core.array, data)
train_images, train_labels, test_images, test_labels = map(mx.array, data)
```

### The model
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@charlesbvll how about if we remove the model block. in the end this is not so Flower-specific...

Copy link
Member

Choose a reason for hiding this comment

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

I think we could remove the code (so we don't have to maintain the same code in 2 different places), but it might be good to keep some explanation of what the model is and what it is doing to give some context

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.

None yet

4 participants