FedML icon indicating copy to clipboard operation
FedML copied to clipboard

How do different algorithms work?

Open caozhantao opened this issue 3 years ago • 2 comments

Hello,I want to ask for a help: In the "main_fedml_image_segmentation. py" file of the fedcv module, "SegmentationTrainer. py" and "SegmentationAggregator. py" under the "image_segmentation/trainer" module are imported during training. Suppose I modify different algorithms in "fedml_config. yaml", such as FedAvg, FedOpt, FedProx, but still use the same SegmentationTrainer and SegmentationAggregator, without any difference? How should different algorithms be implemented? In fedcv/segmentation, how do the algorithms in fedml/simulation/mpi work? They are all the same?

caozhantao avatar Dec 06 '22 02:12 caozhantao

First of all look at these files and make sure your code is actually going into the right path as you change the algorithm.

  1. python/fedml/cross_silo/fedml_server.py
  2. python/fedml/ml/aggregator/agg_operator.py

In the second file, you may see various algorithms which may take action once you change the algorithm in a config file. In the first file, you might wanna create additional conditions to activate your new algorithm hence this file only has conditions for two algorithms (FedAvg and LSA).

P.S. I don;t know what LSA is actually :-)

Adeelbek avatar Dec 08 '22 03:12 Adeelbek

@caozhantao Were you able to resolve your issue based on @Adeelbek's suggestion?

fedml-dimitris avatar Oct 25 '23 02:10 fedml-dimitris