alibaba / FederatedScope

An easy-to-use federated learning platform
https://www.federatedscope.io
Apache License 2.0
1.3k stars 209 forks source link

Some questions about the chapter 'Start Your Own Case' #707

Closed ExploreUnknowed closed 10 months ago

ExploreUnknowed commented 1 year ago

I am a beginner to FS framework. So I hope the developer can give me a complete code example related to customization, such as building a custom data set, building a custom model, building a custom trainer, building a custom evaluation, etc. And these codes can be run.If possible, use the mnist dataset as an example,Thanks!

rayrayraykk commented 1 year ago

Thank you for your interests in FS. You can either refer to examples in https://github.com/alibaba/FederatedScope/tree/master/federatedscope/contrib and code block in https://federatedscope.io/docs/own-case/ .

After you implementent the code in federatedscope/contrib, you can run the main.py via python federatedscope/main.py --cfg scripts/example_configs/femnist.yaml federate.total_round_num 50 dataloader.batch_size 128 data.type YOUR-SPESIFIC-DATA-TYPE config.seed YOUR-SPESIFIC-SEED.