How to run PPFL
APPFL provides users with the capabilities of simulating and training PPFL on either a single machine, a cluster, or multiple heterogeneous machines.
simulation as running PPFL on a single machine or a cluster without actual data decentralization
training as running PPFL on multiple (heterogeneous) machines with actual decentralization of client datasets
Hence, we describe two types of PPFL run:
Before reading this section, please check out Tutorials for more detailed examples in notebooks.
For either simulation or training, a skeleton of the script for running PPFL can be written as follows:
1from appfl import * 2from appfl.config import * 3 4def main(): 5 6 # load default configuration 7 cfg: DictConfig = OmegaConf.structured(Config) 8 9 model = ... # user-defined model 10 data = ... # user-defined datasets 11 12 # The choice of PPFL runs 13 14if __name__ == "__main__": 15 main()
Some remarks are made as follows: