Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
Administrator b0b6a32ec6 | 4 years ago | |
---|---|---|
algorithm | 4 years ago | |
examples/data | 4 years ago | |
storage | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 4 years ago | |
requirements.txt | 4 years ago |
OpenI纵横 是微众银行AI团队开源的一套联邦学习计算工具集,主要面向联邦学习研究人员。它是为了解决在满足用户数据安全、法律合规条件下的多方数据使用和联合建模。
OpenI纵横简单易用,方便快速实验和迭代算法,它提供了丰富的一站式联邦建模算法组件,满足大多数联邦建模任务。
OpenI纵横提供的核心功能列表:
OpenI纵横 可以在linux 或 mac上进行安装部署。
pip install -r requirements.txt
执行storage配置命令,生成数据存储路径:
sh ./storage/lvdb-service/configure
启动storage服务:
cd storage/lvdb-service/src && sh startup.sh
启动完成后,需要执行如下命令,退回到顶层目录继续进行 3. 步骤
cd ../../..
算法server目前是3方,对应代码包algorithm下的guest、host、arbiter三个目录
a. 对于每方算法包的部署,首先需要配置 ./algorithm/$role/dict/conf.ini 的所有方的ip和端口。
即 guest_server_host、guest_server_port、host_server_host、host_server_por、arbiter_server_hos、arbiter_server_port。其中$role表示是guest、host、arbiter三方角色
b. 配置完成后,各方启动对应的算法server.
guest: python algorithm/guest/bin/privacy_guest_server.py
host: python algorithm/host/bin/privacy_host_server.py
arbiter: python algorithm/arbiter/bin/privacy_arbiter_server.py
该节文档帮助你快速 OpenI纵横 上的程序,以examples/data/breast_a(b).csv数据 运行纵向Logistic Regression 作为示例.
guest方数据导入:
python algorithm/scripts/load_db.py examples/data/breast_b.csv breast_b
host方数据导入:
python algorithm/scripts/load_db.py examples/data/breast_a.csv breast_a
在每次运行任务前,需要创建任务文件夹,且把相应算法目录下的bin、dict两个文件夹拷贝进去
algorithm/scripts/create_task_dir.py提供了该功能。
使用方法:
python algorithm/scripts/create_task_dir.py ./algorithm/ $role $taskid
其中 $role 代表任务方角色,即guest、host、arbiter, $taskid唯一标识此次运行任务
guest方任务运行文件夹创建; python algorithm/scripts/create_task_dir.py ./algorithm/ guest test_hetero_lr_01
host方任务运行文件夹创建: python algorithm/scripts/create_task_dir.py ./algorithm/ host test_hetero_lr_01
arbiter方任务运行文件夹创建: python algorithm/scripts/create_task_dir.py ./algorithm/ arbiter test_hetero_lr_01
创建任务文件夹后,需要在任务对应的文件夹下进行算法输入数据、算法参数的配置。
a. guest配置修改:
修改 ./algorithm/guest/task/test_hetero_lr_01/dict/conf.ini,
local_db = breast_b
remote_db = breast_a
b. host配置修改
修改 ./algorithm/host/task/test_hetero_lr_01/dict/conf.ini
local_db = breast_b
remote_db = breast_a
其中:local_db代表guest方的数据表名,remote_db代表的是host方
在guest方任务文件夹下直接运行bin/start_task_guest.py即可.
python ./algorithm/guest/task/test_hetero_lr_01/bin/start_task_guest.py test_hetero_lr_01 1 lr 1
任务日志在各方任务文件夹的log目录下
./algorithm/guest/task/test_hetero_lr_01/log
OpenI纵横 是微众银行AI团队开源的一套联邦学习计算工具集,主要面向联邦学习研究人员。它是为了解决在满足用户数据安全、法律合规条件下的多方数据使用和联合建模。
Python Protocol Buffer Text
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》