Skip to content
A Simulation Framework for Federated Learning Based on PyTorch
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
models Initial upload Nov 11, 2019
LICENSE update README with paper reference Dec 12, 2019
environment.yml Initial upload Nov 11, 2019 Disable DQN server Dec 5, 2019



Welcome to FLSim, a PyTorch based federated learning simulation framework, created for experimental research in a paper accepted by IEEE INFOCOM 2020:

Hao Wang, Zakhary Kaplan, Di Niu, Baochun Li. "Optimizing Federated Learning on Non-IID Data with Reinforcement Learning," in the Proceedings of IEEE INFOCOM, Beijing, China, April 27-30, 2020.


To install FLSim, all that needs to be done is clone this repository to the desired directory.


FLSim uses Anaconda to manage Python and it's dependencies, listed in environment.yml. To install the fl-py37 Python environment, set up Anaconda (or Miniconda), then download the environment dependencies with:

conda env -n fl-py37 -f environment.yml


Before using the repository, make sure to activate the fl-py37 environment with:

conda activate fl-py37


To start a simulation, run from the repository's root directory:

  --log=INFO flags
  • --config (-c): path to the configuration file to be used.
  • --log (-l): level of logging info to be written to console, defaults to INFO.
config.json files

FLSim uses a JSON file to manage the configuration parameters for a federated learning simulation. Provided in the repository is a generic template and three preconfigured simulation files for the CIFAR-10, FashionMNIST, and MNIST datasets.

For a detailed list of configuration options, see the wiki page.

If you have any questions, please feel free to contact Hao Wang (

You can’t perform that action at this time.