联邦学习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 ...
随机推荐
- docker build提示 error checking context:can't stat xxx
这个提示基本是权限不够外加目录结构不对,保险的做法直接删除 Dockerfile. 正确做法:(可能还有其他的解决方案吧,这个可以生效) 重新建个目录,给目录授权,然后再dockerfile文件夹中建 ...
- QT实现简单曲线图
首先用到的控件为QGraphicsView 使用到的头文件 #include <QChart> #include <QChartView> #include <QtWid ...
- 解决 vue init webpack 报错问题 报错原因是因为不能执行脚本文件。
解决方案: 运行下面一行代码: set-ExecutionPolicy RemoteSigned
- CI框架 between and sql语句
1.在文档里没有找到关于where() between and 相应的说明 每次组合查询 要么写原生 要么连续调用where方法. 可用以下方式组合 $condition = array(); $co ...
- NOIP2010普及组
T2]接水问题 有一些小细节,比如如果最小值存在多个,比如最后还需要一个完全结束的最大值 #include<iostream> #include<cstring> #inclu ...
- 如何在Windows下使用WebMatrix+IIS开发PHP程序
最近接收一个新项目,领导要求对客户端的接口采用PHP开发,为了方便,我就采用 Windows7专业版64位 + IIS7.5 + PHP5.5 + WebMatrix 作为开发环境进行开发: 首先下载 ...
- Float浮动、 CSS定位(position)
Float浮动. CSS定位(position)1.CSS定位机制(1)普通流(标准流)-默认状态,元素自动从左往右,从上往下的排列(2)浮动-会使元素向左或向右移动,只能左右,不能上下-浮动元素碰到 ...
- 持续集成环境(2)-Jenkins插件管理
Jenkins本身不提供很多功能,我们可以通过使用插件来满足我们的使用.例如从Gitlab拉取代码,使用 Maven构建项目等功能需要依靠插件完成.接下来演示如何下载插件. 修改Jenkins插件下载 ...
- PCRaster安装
改了很久才import成功.期间查了不少东西,虽然大部分没用上,但还是记录一下. PCRaster的安装和个人的最终解决方法 Software for environmental modelling ...
- Hive:FAILED: LockException [Error 10280]: Error communicating with the metastore
1.问题示例 使用hive直接选择查看表中数据报错,而相同语句在spark-sql却不报错. 实在无力吐槽hive了,因它受伤太多了. (1)使用hive hive (test)> select ...