question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FedAvg accuracy stucks under 50

See original GitHub issue

I am training Fedavg to get the benchmark accuracy with the given parameters. But, the accuracy is stuck under 50.

Here is all my code:

!git clone https://github.com/FedML-AI/FedML

cd /content/FedML/fedml_experiments/standalone/fedavg

!python main_fedavg.py --model mobilenet --dataset cifar10 --data_dir ./../../../data/cifar10 --partition_method hetero --comm_round 100 --epochs 20 --batch_size 64 --lr 0.001

I suppose to get over 80% accuracy at least according to these benchmark results.

https://wandb.ai/automl/fedml/runs/390hdz0e

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:39 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
wizard1203commented, Apr 29, 2021

@hangxu0304 @AbdulMoqeet Hi, I find some possible reasons for this bug: Please check these codes: Original version: https://github.com/FedML-AI/FedML/blob/50d8a45d27675343a7b05a9b31279f6764d3f2ad/fedml_api/standalone/fedavg/fedavg_trainer.py#L45

Current version: https://github.com/FedML-AI/FedML/blob/8ccc24cf2c01b868988f5d5bd65f1666cf5526bc/fedml_api/standalone/fedavg/fedavg_api.py#L64

In the original version, the global model is deepcopied and loaded into clients. However, in the current version, the local client just load the global model (without deepcopy). So maybe the local training in every client will update the global model ?

I’m not completely sure that the bug is cased by this. Could you please change the current codes (make a deepcopy of global model) and to see if the result is correct?

0reactions
chaoyanghecommented, Aug 17, 2022

@11asdad @mmendiet @AbdulMoqeet our new version is released. Please check the latest repo

Read more comments on GitHub >

github_iconTop Results From Across the Web

Federated Learning on Non-IID Data Silos - arXiv
The accuracy of existing approaches including FedAvg, Fed-. Prox, SCAFFOLD, and FedNova under different non-IID data settings is shown in Table III. For...
Read more >
Federated Learning for Predicting the Next Node in Action Flows
Table 1: Comparison between model accuracies for different clients. Number of. Action Flows. Accuracy (%). Local Model. Accuracy (%). Centralized Model.
Read more >
Towards Peer-to-Peer Federated Learning: Algorithms and Com
5.2 A comparison of Fedavg to FedavgP2P considering models sent in the network when 97% model accuracy had been reached. Note that in...
Read more >
Heterogeneity Aware Federated Learning - Digital WPI
For example, we found that FedAvg converges 6% faster than ... was not able to perform at the same or better level than...
Read more >
Multi-Level Branched Regularization for Federated Learning
FedAvg (McMahan et al., 2017), the standard optimization method of federated learning, ... local updates 50 for all experiments unless specified other-.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found