- To generate the dataset
$ python data_generator.py
- To run the baseline model
$ python baseline.py
- To run the Distributed FedAvg Model:
$ mpiexec -n 3 python -m mpi4py fedavg.py
- To run the Distributed FedSGD Model:
$ mpiexec -n 3 python -m mpi4py fedsgd.py
- Create and activate a conda environment with python=3.10
$ conda create -n mpi4py python=3.10
$ conda activate mpi4py
- Run following command:
$ conda install -c conda-forge mpi4py openmpi
- To execute the files (not-preferred):
$ mpiexec -n 3 script.py
3.1 To excute the files with exceptions that might cause deadlock (https://mpi4py.readthedocs.io/en/stable/mpi4py.run.html) - preferred option:
mpiexec -n 3 python -m mpi4py script.py
Links: