KarhouTam / FL-bench

Benchmark of federated learning. Dedicated to the community. 🤗
GNU General Public License v3.0
492 stars 74 forks source link

pFedSim training question #107

Open Warrior0x1 opened 6 days ago

Warrior0x1 commented 6 days ago

Why does running pFedSim and FedAvg using the medmnistA dataset in your latest repository result in severe fluctuations and non-convergence? This issue didn't occur in previous repositories. Could it be a problem with my dataset settings? My configuration is as follows:


{
  "method": "pfedsim",
  "dataset": {
    "name": "medmnistA",
    "client_num": 100,
    "test_ratio": 0.25,
    "val_ratio": 0.0,
    "seed": 42,
    "split": "sample",
    "IID_ratio": 0.0,
    "monitor_window_name_suffix": "medmnistA-100clients-0%IID-Dir(0.1)-seed42",
    "alpha": 0.1,
    "least_samples": 40
  },
  "model": {
    "name": "lenet5",
    "use_torchvision_pretrained_weights": true,
    "external_model_weights_path": null
  },
  "optimizer": {
    "lr": 0.01,
    "dampening": 0,
    "weight_decay": 0,
    "momentum": 0,
    "nesterov": false,
    "name": "sgd"
  },
  "mode": "serial",
  "parallel": {
    "ray_cluster_addr": null,
    "num_cpus": null,
    "num_gpus": null,
    "num_workers": 2
  },
  "common": {
    "seed": 42,
    "join_ratio": 0.1,
    "global_epoch": 200,
    "local_epoch": 5,
    "finetune_epoch": 0,
    "batch_size": 32,
    "test_interval": 100,
    "straggler_ratio": 0,
    "straggler_min_local_epoch": 0,
    "buffers": "global",
    "eval_test": true,
    "eval_val": false,
    "eval_train": false,
    "verbose_gap": 10,
    "visible": "visdom",
    "use_cuda": true,
    "save_log": true,
    "save_model": false,
    "save_fig": true,
    "save_metrics": true,
    "delete_useless_run": true
  },
  "pfedsim": {
    "warmup_round": 0.5
  }
}

be5ebc6765d421d1ab19a3a9acd1663

KarhouTam commented 5 days ago

Sorry I am away from my workstation now. I will evaluate pFedSim later when I am back. Please stay tuned.

What about other datasets? Is pFedSim only performs bad on medmnistA?

elegy112138 commented 4 days ago

FedAvg is not performing as well on CIFAR-10 as it used to. I haven't tested the others.