OpenFed has been accepted to CVPRW23! (The Second Workshop on Federated Learning for Computer Vision)
OpenFed is a foundational library for federated learning research and supports many research projects. It reduces the barrier to entry for both researchers and downstream users of Federated Learning by the targeted removal of existing pain points. For researchers, OpenFed provides a framework wherein new methods can be easily implemented and fairly evaluated against an extensive suite of benchmarks. For downstream users, OpenFed allows Federated Learning to be plug and play within different subject-matter contexts, removing the need for deep expertise in Federated Learning.
PyTorch >= 1.5.1, python>=3.6
Build latest version from source with conda:
conda create -n openfed python=3.7 -y
conda activate openfed
git clone https://github.com/FederalLab/OpenFed.git
cd OpenFed
pip install -e .
Stable version: pip install openfed
- Install extra package:
pip install torchvision numpy
- Download MNIST dataset:
python examples/run.py --download
- Start a simulation (
nproc
means the total number of federated nodes):
python -m openfed.tools.simulator --nproc 6 examples/run.py
100%|██████████████████████████████████████████| 10/10 [00:01<00:00, 6.49it/s]
If you find this project useful in your research, please consider cite:
@misc{chen2021openfed,
title={OpenFed: A Comprehensive and Versatile Open-Source Federated Learning Framework},
author={Dengsheng Chen and Vince Tan and Zhilin Lu and Jie Hu},
year={2021},
eprint={2109.07852},
archivePrefix={arXiv},
primaryClass={cs.CR}
}
We appreciate all contributions to improve OpenFed. Please refer to CONTRIBUTING.md for the contributing guideline.
OpenFed is released under the MIT License.