git clone https://github.com/fedlib/fedlib
cd fedlib
pip install -v -e .
# "-v" means verbose, or more output
# "-e" means installing a project in editable mode,
# thus any local modifications made to the code will take effect without reinstallation.cd fedlib/fedlib
python train.py file ./config_examples/fedavg_cifar10_resnet10.yamlBlades internally calls ray.tune; therefore, the experimental results are output to its default directory: ~/ray_results.
To run blades on a cluster, you only need to deploy Ray cluster according to the official guide.
In detail, the following strategies are currently implemented:
Please cite our paper (and the respective papers of the methods used) if you use this code in your own work:
@article{li2023blades,
title={Blades: A Unified Benchmark Suite for Byzantine Attacks and Defenses in Federated Learning},
author= {Li, Shenghui and Ju, Li and Zhang, Tianru and Ngai, Edith and Voigt, Thiemo},
journal={arXiv preprint arXiv:2206.05359},
year={2023}
}