Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

use of Xaynet with Raspberry pi #961

Open
prathapkumarbaratam opened this issue Dec 29, 2021 · 10 comments
Open

use of Xaynet with Raspberry pi #961

prathapkumarbaratam opened this issue Dec 29, 2021 · 10 comments

Comments

@prathapkumarbaratam
Copy link

hi @Robert-Steiner , Iam currently working on project about federated learning and came across your framework during exploratory analysis. My project should utilize federated learning in this manner - I have an aggregation server (let's say in a cloud). I want this server to provide a model for my 2 Raspberry PIs. These two RPIs would then train the model on a local data for x epochs and provide the trained models/gradients back to the global server. On this server, the results would be federated averaged and a new model would be sent to the PIs. Is such a workflow possible with your framework? If so, could you provide me with a hint?any other examples using xaynet if possible?

Thank you,

@Robert-Steiner
Copy link
Contributor

Robert-Steiner commented Jan 3, 2022

Hi @prathapkumarbaratam, yes that is possible. You can use our Python SDK to write your own client that fits your needs or you can also take a look into our examples in bindings/python/examples. Please note that the PET protocol requires at least three clients in order to function. Further, the selection of clients is random, which means that it will probably require more than three clients for the server to run several rounds. If you need any further assistance, please let me know.

@prathapkumarbaratam
Copy link
Author

Thanks for quick response @Robert-Steiner . When Iam running rust examples. Iam getting error like this. can you help me in this?

the first pic i have tried running coordinater and second pic I have tried running example with 4 participants and getting log like that. can you figure it out once
Screenshot (14)
Screenshot (15)

Thanks and Regards
Prathap kumar

@acrrd
Copy link
Contributor

acrrd commented Jan 4, 2022

This does not seems to be related with the project. Maybe you have a compilation that hanged some where and it is still keeping the lock or some inconsistency within the .cargo directory.
You can take a look here on how to resolve your issue:
https://stackoverflow.com/questions/47565203/cargo-build-hangs-with-blocking-waiting-for-file-lock-on-the-registry-index-a

@Robert-Steiner
Copy link
Contributor

@prathapkumarbaratam I also recommend to use docker compose to build and run the coordinator. The coordinator requires some infrastructure like redis for saving its state and the docker compose command here starts everything that is needed.

@prathapkumarbaratam
Copy link
Author

prathapkumarbaratam commented Jan 7, 2022

@Robert-Steiner can you tell me why iam getting this error after running Docker-compose for this case(I am bit new to docker). it is saying that app/configs not found. And also tell me step by step with commands how to run FL using xaynet framework.
image
image

Thanks and Regards,
Prathap kumar

@prathapkumarbaratam
Copy link
Author

hi, after running docker-compose up from docker directory ,i got like this. Can you tell me is it over?any thing wrong in it. Iam bit new to docker and docker compose. can anyone tell me step by step. i didn't get understood from logs. and also me tell me what commands i have to type in power shell for running a simple Federated learning basic example by step by step.
Screenshot (26)
Screenshot (27)
Screenshot (28)

Thanks and Regards,
Prathap kumar

@acrrd
Copy link
Contributor

acrrd commented Jan 10, 2022

The coordinator is running correctly. You can follow this example to create https://github.com/xaynetwork/xaynet/blob/master/bindings/python/examples/keras_house_prices/README.md your own client.
Keep in mind that the selection of a client for each phase of the protocol is random, and a client for one particular round could not be choose at all. So to successfully complete a round you need many active clients, but there should be not problem in running more the one on a Raspberry.
For more information about the protocol please read the whitepaper.

@prathapkumarbaratam
Copy link
Author

@acrrd Iam getting following error after creating xaynet virtual environment. seems xaynet-sdk-python not supported?

image

@acrrd
Copy link
Contributor

acrrd commented Jan 18, 2022

are you using python 3.6 or higher? I cannot reproduce this.

@prathapkumarbaratam
Copy link
Author

prathapkumarbaratam commented Jan 18, 2022

iam using python 3.7.9 version @acrrd @Robert-Steiner

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants