<pre>
/$$$$$$$$ /$$ /$$ /$$
_ _ U _____ u _ _ U ___ u | $$_____/| $$ |__/ | $$
|'| |'| \| ___"|/ |"| |"| \/"_ \/ | $$ | $$ /$$ /$$$$$$ /$$$$$$
/| |_| |\ | _|" U | | u U | | u | | | | | $$$$$ | $$ | $$|_ $$_/ /$$__ $$
U| _ |u | |___ \| |/__ \| |/__.-,_| |_| | | $$__/ | $$ | $$ | $$ | $$$$$$$$
|_| |_| |_____| |_____| |_____|\_)-\___/ | $$ | $$ | $$ | $$ /$$| $$_____/
// \\ << >> // \\ // \\ \\ | $$ | $$$$$$$$| $$ | $$$$/| $$$$$$$
(_") ("_)(__) (__)(_")("_)(_")("_) (__) |__/ |________/|__/ \___/ \_______/
Version 1.0.0
</pre>
<div align="center">
<h1 align="center">FLite: A Lightweight Federated Learning Framework for Real-World Deployment</h1>
![GitHub](https://img.shields.io/github/license/Sensorjang/FLite)
![Version](https://img.shields.io/badge/Version-V1.0.0-yellow)
![Language](https://img.shields.io/badge/Language-Python-blue)
![Build](https://img.shields.io/badge/Build-passing-lightgreen)
![Maintained](https://img.shields.io/badge/Maintained-Yes-red)
</div>
## Introduction
**Graduation Project: Design and Implementation of a Topology Based Distributed Training Federated Learning Experimental Framework. <br/>**
**毕业设计:一种基于拓扑结构的分布式训练联邦学习实验框架的设计与实现<br/>**
[Software Engineering, School of Computer Science and Technology, WUST, P. Qi(Sensorjang@wust.edu.cn)]<br/>
## Prerequisites
- Linux 或 macOS
- Python 3.6+
- PyTorch 1.3+
- CUDA 9.2+(如果您使用GPU运行)
## Installation
这里是使用 conda 配置FLite环境的完整命令<br/>
Here is the complete command to configure the FLite environment using conda<br/>
```bash
# create a new conda environment
# 创建一个新的conda环境
conda create -n flite python=3.7 -y
conda activate flite
# CPU only
# 在仅通过CPU计算的设备上运行
conda install pytorch==1.6.0 torchvision==0.7.0 -c pytorch -y
# With GPU
# 在支持GPU的设备上运行
conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.1 -c pytorch -y
# install FLite
# 安装FLite
git clone https://github.com/Sensorjang/FLite.git
cd FLite
pip install -v -e .
```
## Features Overview
### 联邦学习计算范例支持
- 独立仿真训练 Independent Simulation Training
- 分布式训练(基于gRPC通信协议)Distributed Training (based on gRPC communication protocol)
### 数据集与模型支持
| - | LeNet | ResNet18 | ResNet50 | RNN | simple-CNN | VGG9 |
| :---: |:-----:|:--------:|:--------:|:---:|:----------:|:----:|
| Cifar10 | √ | √ | √ | | √ | √ |
| FEMNIST | √ | | | | √ | |
| Shakespeare | | | | √ | | |
| Cifar100 | √ | √ | √ | | √ | √ |
### 联邦聚合算法支持
- FedAvg
- FedProx
- equal
#### 聚合策略:all、parameters
- all:使用statedict聚合模型,包括模型参数和持久缓冲区(如BatchNorm统计数据)
- parameters:只聚集模型参数。
### 模型加密算法支持
- Blowfish
- DES
- Salsa20
### 数据分布支持
支持:iid、niid(用于feminist和shakespeare),以及dir和class(用于cifar系列数据集)
### 联邦优化器
- SGD
- Adam
### 联邦学习配置文件
- python代码中导入配置
- 外部yaml文件入配置
- 混合导入配置
- 使用指令参数传递配置
### 联邦建模追踪服务
本地数据库配置,支持sqlite3和mysql
### 异构联邦客户端模拟
- iso: 选定客户端具有等长睡眠时间分布
- dir: 使用对称狄利克雷过程对睡眠时间异质性进行采样,以模拟直接异质性
- real: 模拟真实的异构性,即客户端的计算能力不同。使用主流智能手机的真实速度比来模拟睡眠时间的异构性
#### 处理系统异构的分组策略
支持:随机、贪婪、最慢(random, greedy, slowest)
## Quick Start
Flite提供了许多示例,您可以在[examples](/examples)目录下找到它们。<br/>
Flite provides many examples, which can be found in the [examples](/examples) directory.<br/>
## License
This project is released under the [MIT License](LICENSE).
Raw data
{
"_id": null,
"home_page": "https://github.com/Sensorjang/FLite",
"name": "FLite",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "federated learning,machine learning,distributed machine learning,FL framework,privacy preserving",
"author": "P.Qi(Sensorjang)",
"author_email": "Sensorjang@wust.edu.cn",
"download_url": "https://files.pythonhosted.org/packages/60/7c/eb4be0dadd361b7c41e9856fe32383451e37f9f6190391fc74f48b198ac7/FLite-1.0.0.tar.gz",
"platform": null,
"description": "<pre>\n /$$$$$$$$ /$$ /$$ /$$\n _ _ U _____ u _ _ U ___ u | $$_____/| $$ |__/ | $$\n |'| |'| \\| ___\"|/ |\"| |\"| \\/\"_ \\/ | $$ | $$ /$$ /$$$$$$ /$$$$$$\n /| |_| |\\ | _|\" U | | u U | | u | | | | | $$$$$ | $$ | $$|_ $$_/ /$$__ $$\n U| _ |u | |___ \\| |/__ \\| |/__.-,_| |_| | | $$__/ | $$ | $$ | $$ | $$$$$$$$ \n |_| |_| |_____| |_____| |_____|\\_)-\\___/ | $$ | $$ | $$ | $$ /$$| $$_____/\n // \\\\ << >> // \\\\ // \\\\ \\\\ | $$ | $$$$$$$$| $$ | $$$$/| $$$$$$$\n (_\") (\"_)(__) (__)(_\")(\"_)(_\")(\"_) (__) |__/ |________/|__/ \\___/ \\_______/\n Version 1.0.0\n</pre>\n\n<div align=\"center\">\n<h1 align=\"center\">FLite: A Lightweight Federated Learning Framework for Real-World Deployment</h1>\n\n![GitHub](https://img.shields.io/github/license/Sensorjang/FLite)\n![Version](https://img.shields.io/badge/Version-V1.0.0-yellow)\n![Language](https://img.shields.io/badge/Language-Python-blue)\n![Build](https://img.shields.io/badge/Build-passing-lightgreen)\n![Maintained](https://img.shields.io/badge/Maintained-Yes-red)\n\n</div>\n\n## Introduction\n**Graduation Project: Design and Implementation of a Topology Based Distributed Training Federated Learning Experimental Framework. <br/>**\n**\u6bd5\u4e1a\u8bbe\u8ba1\uff1a\u4e00\u79cd\u57fa\u4e8e\u62d3\u6251\u7ed3\u6784\u7684\u5206\u5e03\u5f0f\u8bad\u7ec3\u8054\u90a6\u5b66\u4e60\u5b9e\u9a8c\u6846\u67b6\u7684\u8bbe\u8ba1\u4e0e\u5b9e\u73b0<br/>**\n[Software Engineering, School of Computer Science and Technology, WUST, P. Qi(Sensorjang@wust.edu.cn)]<br/>\n\n## Prerequisites\n- Linux \u6216 macOS\n- Python 3.6+\n- PyTorch 1.3+\n- CUDA 9.2+\uff08\u5982\u679c\u60a8\u4f7f\u7528GPU\u8fd0\u884c\uff09\n\n## Installation\n\u8fd9\u91cc\u662f\u4f7f\u7528 conda \u914d\u7f6eFLite\u73af\u5883\u7684\u5b8c\u6574\u547d\u4ee4<br/>\nHere is the complete command to configure the FLite environment using conda<br/>\n\n```bash\n# create a new conda environment\n# \u521b\u5efa\u4e00\u4e2a\u65b0\u7684conda\u73af\u5883\nconda create -n flite python=3.7 -y\nconda activate flite\n\n# CPU only\n# \u5728\u4ec5\u901a\u8fc7CPU\u8ba1\u7b97\u7684\u8bbe\u5907\u4e0a\u8fd0\u884c\nconda install pytorch==1.6.0 torchvision==0.7.0 -c pytorch -y\n# With GPU\n# \u5728\u652f\u6301GPU\u7684\u8bbe\u5907\u4e0a\u8fd0\u884c\nconda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=10.1 -c pytorch -y\n\n# install FLite\n# \u5b89\u88c5FLite\ngit clone https://github.com/Sensorjang/FLite.git\ncd FLite\npip install -v -e .\n```\n\n## Features Overview\n\n### \u8054\u90a6\u5b66\u4e60\u8ba1\u7b97\u8303\u4f8b\u652f\u6301\n- \u72ec\u7acb\u4eff\u771f\u8bad\u7ec3 Independent Simulation Training\n- \u5206\u5e03\u5f0f\u8bad\u7ec3\uff08\u57fa\u4e8egRPC\u901a\u4fe1\u534f\u8bae\uff09Distributed Training (based on gRPC communication protocol)\n\n### \u6570\u636e\u96c6\u4e0e\u6a21\u578b\u652f\u6301\n| - | LeNet | ResNet18 | ResNet50 | RNN | simple-CNN | VGG9 |\n| :---: |:-----:|:--------:|:--------:|:---:|:----------:|:----:|\n| Cifar10 | \u221a | \u221a | \u221a | | \u221a | \u221a |\n| FEMNIST | \u221a | | | | \u221a | |\n| Shakespeare | | | | \u221a | | |\n| Cifar100 | \u221a | \u221a | \u221a | | \u221a | \u221a |\n\n### \u8054\u90a6\u805a\u5408\u7b97\u6cd5\u652f\u6301\n- FedAvg\n- FedProx\n- equal\n\n\n#### \u805a\u5408\u7b56\u7565\uff1aall\u3001parameters\n\n- all\uff1a\u4f7f\u7528statedict\u805a\u5408\u6a21\u578b\uff0c\u5305\u62ec\u6a21\u578b\u53c2\u6570\u548c\u6301\u4e45\u7f13\u51b2\u533a\uff08\u5982BatchNorm\u7edf\u8ba1\u6570\u636e\uff09\n- parameters\uff1a\u53ea\u805a\u96c6\u6a21\u578b\u53c2\u6570\u3002\n\n### \u6a21\u578b\u52a0\u5bc6\u7b97\u6cd5\u652f\u6301\n- Blowfish\n- DES\n- Salsa20\n\n### \u6570\u636e\u5206\u5e03\u652f\u6301\n\u652f\u6301\uff1aiid\u3001niid\uff08\u7528\u4e8efeminist\u548cshakespeare\uff09\uff0c\u4ee5\u53cadir\u548cclass\uff08\u7528\u4e8ecifar\u7cfb\u5217\u6570\u636e\u96c6\uff09\n\n### \u8054\u90a6\u4f18\u5316\u5668\n- SGD\n- Adam\n\n### \u8054\u90a6\u5b66\u4e60\u914d\u7f6e\u6587\u4ef6\n- python\u4ee3\u7801\u4e2d\u5bfc\u5165\u914d\u7f6e\n- \u5916\u90e8yaml\u6587\u4ef6\u5165\u914d\u7f6e\n- \u6df7\u5408\u5bfc\u5165\u914d\u7f6e\n- \u4f7f\u7528\u6307\u4ee4\u53c2\u6570\u4f20\u9012\u914d\u7f6e\n\n### \u8054\u90a6\u5efa\u6a21\u8ffd\u8e2a\u670d\u52a1\n\u672c\u5730\u6570\u636e\u5e93\u914d\u7f6e,\u652f\u6301sqlite3\u548cmysql\n\n### \u5f02\u6784\u8054\u90a6\u5ba2\u6237\u7aef\u6a21\u62df\n- iso: \u9009\u5b9a\u5ba2\u6237\u7aef\u5177\u6709\u7b49\u957f\u7761\u7720\u65f6\u95f4\u5206\u5e03\n- dir: \u4f7f\u7528\u5bf9\u79f0\u72c4\u5229\u514b\u96f7\u8fc7\u7a0b\u5bf9\u7761\u7720\u65f6\u95f4\u5f02\u8d28\u6027\u8fdb\u884c\u91c7\u6837\uff0c\u4ee5\u6a21\u62df\u76f4\u63a5\u5f02\u8d28\u6027\n- real: \u6a21\u62df\u771f\u5b9e\u7684\u5f02\u6784\u6027\uff0c\u5373\u5ba2\u6237\u7aef\u7684\u8ba1\u7b97\u80fd\u529b\u4e0d\u540c\u3002\u4f7f\u7528\u4e3b\u6d41\u667a\u80fd\u624b\u673a\u7684\u771f\u5b9e\u901f\u5ea6\u6bd4\u6765\u6a21\u62df\u7761\u7720\u65f6\u95f4\u7684\u5f02\u6784\u6027\n\n#### \u5904\u7406\u7cfb\u7edf\u5f02\u6784\u7684\u5206\u7ec4\u7b56\u7565\n\u652f\u6301\uff1a\u968f\u673a\u3001\u8d2a\u5a6a\u3001\u6700\u6162(random, greedy, slowest)\n\n## Quick Start\nFlite\u63d0\u4f9b\u4e86\u8bb8\u591a\u793a\u4f8b\uff0c\u60a8\u53ef\u4ee5\u5728[examples](/examples)\u76ee\u5f55\u4e0b\u627e\u5230\u5b83\u4eec\u3002<br/>\nFlite provides many examples, which can be found in the [examples](/examples) directory.<br/>\n\n## License\nThis project is released under the [MIT License](LICENSE).\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "FLite is a federated learning framework for developers to quickly build federated learning applications.(Design and Implementation of a Topology Based Distributed Training Federated Learning Experimental Framework.)[Software Engineering, School of Computer Science and Technology, WUST, P. Qi(Sensorjang@wust.edu.cn)]",
"version": "1.0.0",
"project_urls": {
"Download": "https://github.com/Sensorjang/FLite.git",
"Homepage": "https://github.com/Sensorjang/FLite"
},
"split_keywords": [
"federated learning",
"machine learning",
"distributed machine learning",
"fl framework",
"privacy preserving"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4fd498500f1b63e55e47d2c2b2e6905860dc1e2fad943535ed5d2ead4008b5bb",
"md5": "7c9ff7a656c6db00bfbfc8a5137d38a7",
"sha256": "b307efc67e42d05227478eef1e79a9f642ee5d7b6689778a1efdfaff58d5fa36"
},
"downloads": -1,
"filename": "FLite-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7c9ff7a656c6db00bfbfc8a5137d38a7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 129769,
"upload_time": "2023-05-05T11:23:33",
"upload_time_iso_8601": "2023-05-05T11:23:33.144611Z",
"url": "https://files.pythonhosted.org/packages/4f/d4/98500f1b63e55e47d2c2b2e6905860dc1e2fad943535ed5d2ead4008b5bb/FLite-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "607ceb4be0dadd361b7c41e9856fe32383451e37f9f6190391fc74f48b198ac7",
"md5": "54eb7e1ad833763446877fc9b0fc4af4",
"sha256": "02d18159b8a0fd5f425f1a8f0a5dfa53fbbcbcd9215b07709e0a7179ceda9dcc"
},
"downloads": -1,
"filename": "FLite-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "54eb7e1ad833763446877fc9b0fc4af4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 92385,
"upload_time": "2023-05-05T11:23:37",
"upload_time_iso_8601": "2023-05-05T11:23:37.036841Z",
"url": "https://files.pythonhosted.org/packages/60/7c/eb4be0dadd361b7c41e9856fe32383451e37f9f6190391fc74f48b198ac7/FLite-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-05 11:23:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Sensorjang",
"github_project": "FLite",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "flite"
}