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

How can the client send custom content messages to the server? #3175

Open
zhangtian-3841 opened this issue Mar 27, 2024 · 3 comments
Open

How can the client send custom content messages to the server? #3175

zhangtian-3841 opened this issue Mar 27, 2024 · 3 comments
Labels
question Further information is requested

Comments

@zhangtian-3841
Copy link

What is your question?

Dear Flower developers,

Hello! Thank you for your excellent work in helping me solve many problems! However, I have a question and I sincerely ask for your assistance:
During the training process, the server needs to know the datashape of the client's dataset. How can I establish a connection between the client and server and at the same time send the datashape of the local dataset to the server?

Thank you for your assistance!

@zhangtian-3841 zhangtian-3841 added the question Further information is requested label Mar 27, 2024
@danieljanes
Copy link
Member

Hi @zhangtian-3841 , thanks for reaching out.

There are several ways to achieve this.

  • The easiest way might be to add the shape of the dataset to the dict returned from fit or evaluate.
  • If the shapes are needed on the server before the training starts, you could use a custom Strategy that sends an empty message to all clients and asks them to return the shapes of their local datasets
  • [Experimental] Flower Next supports sending completely custom messages to clients, but the capability is only available in flwr-nightly and not documented yet

@zhangtian-3841
Copy link
Author

zhangtian-3841 commented Mar 28, 2024

Hi @danieljanes ,thank you for response.
I will try to implement the functionality as you suggested, but How do I use flwr-nightly to customize the strategy, send an empty message to all clients, and request them to return the shape of their local datasets.
I look forward to you adding the usage of Flower Next to the Flower Framework Documentation.
Expressing sincere thanks to you.

@s-hariy
Copy link

s-hariy commented Apr 16, 2024

Dear @danieljanes,

I have a follow up question to this. Let's say we send information to server through below method:

"- The easiest way might be to add the shape of the dataset to the dict returned from fit or evaluate."

Where do we see them on the server and Is it possible to do some processing on them? To give you context, I need to send numerical embedding of images to server from each client. We are trying to do some processing on them after that. Kindly help

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants