联邦学习FATE框架安装搭建
联邦学习
FATE (Federated AI Technology Enabler) 是微众银行AI部门发起的开源项目,为联邦学习生态系统提供了可靠的安全计算框架。FATE项目使用多方安全计算 (MPC) 以及同态加密 (HE) 技术构建底层安全计算协议,以此支持不同种类的机器学习的安全计算,包括逻辑回归、基于树的算法、深度学习和迁移学习等。
FATE官方网站:fate.fedai.org/
FATE文档:fate.readthedocs.io/
安装docker
curl -fsSL https://get.docker.com | bash -s docker --mirror aliyun
下载所需镜像
docker pull federatedai/standalone_fate:1.7.1.1
下载太慢,可以选着下载tar包
root@hello:~# wget https://webank-ai-1251170195.cos.ap-guangzhou.myqcloud.com/fate/1.7.1.1/release/standalone_fate_docker_image_1.7.1.1_release.tar;
root@hello:~# docker load < standalone_fate_docker_image_1.7.1.1_release.tar
613be09ab3c0: Loading layer [==================================================>] 211.1MB/211.1MB
0b0618c6ced8: Loading layer [==================================================>] 34.05MB/34.05MB
7da7d3716181: Loading layer [==================================================>] 20.99kB/20.99kB
a317a6aa16e0: Loading layer [==================================================>] 2.148MB/2.148MB
87365bb20418: Loading layer [==================================================>] 257.8MB/257.8MB
1ff796d14e4f: Loading layer [==================================================>] 162.3MB/162.3MB
5ddd6cd3032d: Loading layer [==================================================>] 16.38kB/16.38kB
72dc59b41d26: Loading layer [==================================================>] 18.94kB/18.94kB
51c3351a5d26: Loading layer [==================================================>] 12.26MB/12.26MB
258e35d02c08: Loading layer [==================================================>] 3.072kB/3.072kB
68512ba32441: Loading layer [==================================================>] 8.704kB/8.704kB
7617803436ad: Loading layer [==================================================>] 3.072kB/3.072kB
b08fdc026a0d: Loading layer [==================================================>] 129.3MB/129.3MB
93ac7e91dd87: Loading layer [==================================================>] 3.287GB/3.287GB
c3e03cea7b5f: Loading layer [==================================================>] 4.608kB/4.608kB
5f70bf18a086: Loading layer [==================================================>] 1.024kB/1.024kB
fe63005b3b70: Loading layer [==================================================>] 488.2MB/488.2MB
b6e2974d86f7: Loading layer [==================================================>] 3.584kB/3.584kB
0f41365d9b69: Loading layer [==================================================>] 3.072kB/3.072kB
22a68c3cca2b: Loading layer [==================================================>] 3.584kB/3.584kB
fd05ae943ab9: Loading layer [==================================================>] 4.096kB/4.096kB
14bbbe13f9fa: Loading layer [==================================================>] 5.632kB/5.632kB
6db147c8b695: Loading layer [==================================================>] 2.848MB/2.848MB
e8875a58bc61: Loading layer [==================================================>] 6.144kB/6.144kB
582394b0287a: Loading layer [==================================================>] 1.154MB/1.154MB
7808bf03bd20: Loading layer [==================================================>] 397.8MB/397.8MB
d144a9e78472: Loading layer [==================================================>] 5.632kB/5.632kB
fff9aed1cf2f: Loading layer [==================================================>] 6.144kB/6.144kB
de747ddfdffa: Loading layer [==================================================>] 5.632kB/5.632kB
bc9989f84045: Loading layer [==================================================>] 5.632kB/5.632kB
Loaded image: federatedai/standalone_fate:1.7.1.1
root@hello:~# docker images | grep federatedai/standalone_fate
federatedai/standalone_fate 1.7.1.1 6911b15a71bd 4 weeks ago 4.92GB
启动容器,并进入
root@hello:~# docker run -d --name standalone_fate -p 8080:8080 federatedai/standalone_fate:1.7.1.1
50e95fda254a383a243576e43859d9ac91d9f8f5a8f84654dfdf99c7d47a8ccc
root@hello:~#
root@hello:~#
root@hello:~#
root@hello:~# docker ps -a | grep standalone_fate
50e95fda254a federatedai/standalone_fate:1.7.1.1 "docker-entrypoint.sh" 22 seconds ago Up 19 seconds 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp standalone_fate
root@hello:~#
root@hello:~#
root@hello:~#
root@hello:~#
root@hello:~#
root@hello:~# docker exec -it $(docker ps -aqf "name=standalone_fate") bash
(app-root) bash-4.2#
(app-root) bash-4.2#
(app-root) bash-4.2#
在容器内进行Toy测试
(app-root) bash-4.2# flow test toy -gid 10000 -hid 10000
toy test job 202202270654137342340 is waiting
toy test job 202202270654137342340 is waiting
toy test job 202202270654137342340 is running
toy test job 202202270654137342340 is running
toy test job 202202270654137342340 is running
toy test job 202202270654137342340 is running
toy test job 202202270654137342340 is running
toy test job 202202270654137342340 is running
toy test job 202202270654137342340 is running
toy test job 202202270654137342340 is success
[INFO] [2022-02-27 06:54:18,706] [202202270654137342340] [229:139661668419392] - [secure_add_guest.run] [line:96]: begin to init parameters of secure add example guest
[INFO] [2022-02-27 06:54:18,707] [202202270654137342340] [229:139661668419392] - [secure_add_guest.run] [line:100]: begin to make guest data
[INFO] [2022-02-27 06:54:18,742] [202202270654137342340] [229:139661668419392] - [secure_add_guest.run] [line:103]: split data into two random parts
[INFO] [2022-02-27 06:54:18,864] [202202270654137342340] [229:139661668419392] - [secure_add_guest.run] [line:106]: share one random part data to host
[INFO] [2022-02-27 06:54:18,911] [202202270654137342340] [229:139661668419392] - [secure_add_guest.run] [line:109]: get share of one random part data from host
[INFO] [2022-02-27 06:54:19,014] [202202270654137342340] [229:139661668419392] - [secure_add_guest.run] [line:112]: begin to get sum of guest and host
[INFO] [2022-02-27 06:54:19,041] [202202270654137342340] [229:139661668419392] - [secure_add_guest.run] [line:115]: receive host sum from guest
[INFO] [2022-02-27 06:54:19,048] [202202270654137342340] [229:139661668419392] - [secure_add_guest.run] [line:122]: success to calculate secure_sum, it is 2000.0000000000005
(app-root) bash-4.2#
如果成功,屏幕显示类似下方的语句:
success to calculate secure_sum, it is 2000.0
单元测试
(app-root) bash-4.2# fate_test unittest federatedml --yes
testsuite namespace: 20220227065434
start to run test /data/projects/fate/fate/python/federatedml/feature/test/feature_imputation_test.py
.
----------------------------------------------------------------------
Ran 1 test in 0.000s
OK
---略----
start to run test /data/projects/fate/fate/python/federatedml/nn/hetero_nn/test/random_number_generator_test.py
using engines: {'computing': 'STANDALONE', 'federation': 'STANDALONE', 'storage': 'STANDALONE', 'federated_mode': 'SINGLE'}
create manager session cc68ee02-979a-11ec-b5d1-0242ac110002
try to save session record for manager cc68ee02-979a-11ec-b5d1-0242ac110002, computing STANDALONE test_random_number0.9860114704767727
save session record for manager cc68ee02-979a-11ec-b5d1-0242ac110002, computing STANDALONE test_random_number0.9860114704767727 successfully
tensor's partition is 10
.using engines: {'computing': 'STANDALONE', 'federation': 'STANDALONE', 'storage': 'STANDALONE', 'federated_mode': 'SINGLE'}
create manager session cd50530a-979a-11ec-b5d1-0242ac110002
try to save session record for manager cd50530a-979a-11ec-b5d1-0242ac110002, computing STANDALONE test_random_number0.6220879309193029
save session record for manager cd50530a-979a-11ec-b5d1-0242ac110002, computing STANDALONE test_random_number0.6220879309193029 successfully
.
----------------------------------------------------------------------
Ran 2 tests in 1.583s
OK
there are 0 failed test
如果成功,屏幕显示类似下方的语句:
there are 0 failed test
页面访问
http://192.168.1.78:8080/#/login
user:admin
pass:admin
https://www.oiox.cn/
https://www.chenby.cn/
https://cby-chen.github.io/
https://weibo.com/u/5982474121
https://blog.csdn.net/qq_33921750
https://my.oschina.net/u/3981543
https://www.zhihu.com/people/chen-bu-yun-2
https://segmentfault.com/u/hppyvyv6/articles
https://juejin.cn/user/3315782802482007
https://space.bilibili.com/352476552/article
https://cloud.tencent.com/developer/column/93230
https://www.jianshu.com/u/0f894314ae2c
https://www.toutiao.com/c/user/token/MS4wLjABAAAAeqOrhjsoRZSj7iBJbjLJyMwYT5D0mLOgCoo4pEmpr4A/
CSDN、GitHub、知乎、开源中国、思否、掘金、简书、腾讯云、哔哩哔哩、今日头条、新浪微博、个人博客、全网可搜《小陈运维》
联邦学习FATE框架安装搭建的更多相关文章
- 联邦学习开源框架FATE助力腾讯神盾沙箱,携手打造数据安全合作生态
近日,微众银行联邦学习FATE开源社区迎来了两位新贡献者——来自腾讯的刘洋及秦姝琦,作为云计算安全领域的专家,两位为FATE构造了新的功能点,并在Github上提交修复了相关漏洞.(Github项目地 ...
- spring学习 三 框架的搭建
1 导入jar包 spring启来最少要5个包,四个核心包和一个依赖的日志包 2 创建配置文件 在dynamic web project下的src目录下,创建一个spring的xml配置文件,名称可以 ...
- 联邦学习 Federated Learning 相关资料整理
本文链接:https://blog.csdn.net/Sinsa110/article/details/90697728代码微众银行+杨强教授团队的联邦学习FATE框架代码:https://githu ...
- 腾讯数据安全专家谈联邦学习开源项目FATE:通往隐私保护理想未来的桥梁
数据孤岛.数据隐私以及数据安全,是目前人工智能和云计算在大规模产业化应用过程中绕不开的“三座大山”. “联邦学习”作为新一代的人工智能算法,能在数据不出本地的情况下,实现共同建模,提升AI模型的效果, ...
- linux内核学习之一:环境搭建--安装Debian7.3
本系列文章假设读者已对linux有一定的了解,其实学习linux内核不需要有很深的关于linux的知识,只需要了解以下内容:linux基础知识及基本shell命令:现代操作系统的基本概念:C语言和gc ...
- SSM学习(一)搭建基础框架
不知不自觉,工作也两年多了,由于公司一直用的是ssh框架,所以所学也一直是ssh.直到有一天,服务器被攻击,tomcat目录下总有莫名其妙的一些文件,这些文件通过远程ftp下载了一些病毒和木马,服务器 ...
- MindSpore联邦学习框架解决行业级难题
内容来源:华为开发者大会2021 HMS Core 6 AI技术论坛,主题演讲<MindSpore联邦学习框架解决隐私合规下的数据孤岛问题>. 演讲嘉宾:华为MindSpore联邦学习工程 ...
- 一脸懵逼学习KafKa集群的安装搭建--(一种高吞吐量的分布式发布订阅消息系统)
kafka的前言知识: :Kafka是什么? 在流式计算中,Kafka一般用来缓存数据,Storm通过消费Kafka的数据进行计算.kafka是一个生产-消费模型. Producer:生产者,只负责数 ...
- 基于C/S架构的3D对战网络游戏C++框架_05搭建系统开发环境与Boost智能指针、内存池初步了解
本系列博客主要是以对战游戏为背景介绍3D对战网络游戏常用的开发技术以及C++高级编程技巧,有了这些知识,就可以开发出中小型游戏项目或3D工业仿真项目. 笔者将分为以下三个部分向大家介绍(每日更新): ...
- 深入学习微框架:Spring Boot(转)
转:http://www.infoq.com/cn/articles/microframeworks1-spring-boot/ 相关参考: https://spring.io/guides/gs/s ...
随机推荐
- mysql查询mapper返参类型为List
List<String> lists = mapper.select(); 返参类型为List,查询没有数据的时候,lists不会为null,lists.size() 为 0.
- 联想lxh-ekb-10ya键盘拆机
今天清理想清理一下键盘,键盘很多年了,没找到拆机教程,注意,如果没有配套螺丝可用拆手机的小螺丝刀,太次的螺丝刀容易弄坏螺丝 1.先上型号 2.第一步肯定是拆螺丝,要注意的是除了明确能看到的螺丝外,标签 ...
- SVN报错:database is locked
https://blog.csdn.net/k7arm/article/details/81168416 https://www.jianshu.com/p/aa9c67fcc407
- IOS文件下载时,文件名的处理
string contentType = MimeMapping.GetMimeMapping(name);var isIOS = false; if (Request.UserAgent != nu ...
- NodeJS - XSS-href
参考:https://owasp-skf.gitbook.io/asvs-write-ups/cross-site-scripting-href-xss-href/kbid-3-xss-url 输入h ...
- Python - XSS-href
参考资料: https://owasp-skf.gitbook.io/asvs-write-ups/cross-site-scripting-href-xss-href/kbid-3-cross-si ...
- PASS模型需求分析和原型设计
班级网址 https://edu.cnblogs.com/campus/zjcsxy/SE2020 作业要求 https://edu.cnblogs.com/campus/zjcsxy/SE2020/ ...
- 小米盒子TV变装魔法
最近从一位台湾的朋友那里白嫖了一个 v2 节点, 恰好家里有一台家用的 小米盒子, 就寻思着能不能折腾一下, 共享上网 先将小米盒子开启adb调试, 参照这里: https://www.jb51.ne ...
- vue input有值但还是验证不通过
验证失败原因: 因为input自动把输入的值转换为string类型,导致验证失败. 解决方案: 一. Input中的v-model改为v-model.number: 二.rules里面需要加type: ...
- bytes转化为字典
import requestsurl='https://su.ke.com/api/listtop?type=resblock&resblock_id=2311062653496924& ...