This project FedAH is based on the open source project PFLlib development.
Install CUDA.
Install conda and activate conda.
conda env create -f env_cuda_latest.yaml # You may need to downgrade the torch using pip to match CUDA version
-
Create proper environments (see Environments).
-
Download this project to an appropriate location using git.
git clone https://github.com/heyuepeng/FedAH.git
-
Run evaluation:
cd ./system python main.py -data MNIST -m cnn -algo FedAH -gr 2000 -did 0 # using the MNIST dataset, the FedAH algorithm, and the 4-layer CNN model
Or you can uncomment the lines you need in
./system/examples.sh
and run:cd ./system sh examples.sh
Note: The hyper-parameters have not been tuned for the algorithms. The values in ./system/examples.sh
are just examples. You need to tune the hyper-parameters by yourself.