当前位置:网站首页>Privacy computing fat offline prediction
Privacy computing fat offline prediction
2022-06-27 13:59:00 【qq_ forty-three million four hundred and seventy-nine thousand 】
High quality resource sharing
Learning route guidance ( Click unlock ) | Knowledge orientation | Crowd positioning |
---|---|---|
🧡 Python Actual wechat ordering applet 🧡 | Progressive class | This course is python flask+ Perfect combination of wechat applet , From the deployment of Tencent to the launch of the project , Create a full stack ordering system . |
Python Quantitative trading practice | beginner | Take you hand in hand to create an easy to expand 、 More secure 、 More efficient quantitative trading system |
One 、 explain
Fate The model predictions are offline forecast
and Online forecasting
Two ways , The effect is the same , Mainly the way of use 、 Applicable scenario 、 High availability 、 There are great differences in performance, etc ; This article uses Fate be based on Vertical logistic regression
The model trained by the algorithm is used for off-line prediction practice .
- Based on the above 《 Privacy computing FATE- model training 》 The model trained in the
- About Fate Please refer to the article for the basic overview and installation deployment of 《 Privacy computing FATE- Key concepts and stand-alone Deployment Guide 》
Two 、 Query model information
Execute the following command , Get into Fate In the container :
docker exec -it $(docker ps -aqf "name=standalone\_fate") bash
First, we need to get the corresponding model_id
and model_version
Information , Can pass job_id Execute the following command to get :
flow job config -j 202205070226373055640 -r guest -p 9999 --output-path /data/projects/fate/examples/my_test/
job_id Can be in FATE Board View in .
After successful execution, the corresponding model information will be returned , And generate a folder under the specified directory job_202205070226373055640_config
{
"data": {
"job\_id": "202205070226373055640",
"model\_info": {
"model\_id": "arbiter-10000#guest-9999#host-10000#model",
"model\_version": "202205070226373055640"
},
"train\_runtime\_conf": {}
},
"retcode": 0,
"retmsg": "download successfully, please check /data/projects/fate/examples/my\_test/job\_202205070226373055640\_config directory",
"directory": "/data/projects/fate/examples/my\_test/job\_202205070226373055640\_config"
}
job_202205070226373055640_config
It contains 4 File :
- dsl.json: Mission dsl To configure .
- model_info.json: Model information .
- runtime_conf.json: Task running configuration .
- train_runtime_conf.json: empty .
3、 ... and 、 Model deployment
Execute the following command :
flow model deploy --model-id arbiter-10000#guest-9999#host-10000#model --model-version 202205070226373055640
Pass respectively --model-id And --model-version Specify the... Found in the above steps model_id and model_version
After the deployment is successful, return :
{
"data": {
"arbiter": {
"10000": 0
},
"detail": {
"arbiter": {
"10000": {
"retcode": 0,
"retmsg": "deploy model of role arbiter 10000 success"
}
},
"guest": {
"9999": {
"retcode": 0,
"retmsg": "deploy model of role guest 9999 success"
}
},
"host": {
"10000": {
"retcode": 0,
"retmsg": "deploy model of role host 10000 success"
}
}
},
"guest": {
"9999": 0
},
"host": {
"10000": 0
},
"model\_id": "arbiter-10000#guest-9999#host-10000#model",
"model\_version": "202205070730131040240"
},
"retcode": 0,
"retmsg": "success"
}
After successful deployment, a new model_version
Four 、 Prepare forecast configuration
Execute the following command :
cp /data/projects/fate/examples/dsl/v2/hetero_logistic_regression/hetero_lr_normal_predict_conf.json /data/projects/fate/examples/my_test/
Put... Directly Fate The built-in vertical logistic regression algorithm prediction configuration example , Copy it to our
my_test
Under the table of contents .
The predicted configuration file mainly configures three parts :
- The above section is to configure the initiator and participant roles
- The middle part needs to be filled with the correct Model information
- The following is the data table used in the forecast
The only thing that needs to be modified is the middle one Model information part ; Note that the version number entered here is Model deployment Version number returned after , And need to add job_type by predict Specify the task type as forecast task .
5、 ... and 、 Perform forecast task
Execute the following command :
flow job submit -c hetero_lr_normal_predict_conf.json
Just like model training, it also uses submit command , adopt -c Specify profile .
Return after successful execution :
{
"data": {
"board\_url": "http://127.0.0.1:8080/index.html#/dashboard?job\_id=202205070731385067720&role=guest&party\_id=9999",
"code": 0,
"dsl\_path": "/data/projects/fate/fateflow/jobs/202205070731385067720/job\_dsl.json",
"job\_id": "202205070731385067720",
"logs\_directory": "/data/projects/fate/fateflow/logs/202205070731385067720",
"message": "success",
"model\_info": {
"model\_id": "arbiter-10000#guest-9999#host-10000#model",
"model\_version": "202205070730131040240"
},
"pipeline\_dsl\_path": "/data/projects/fate/fateflow/jobs/202205070731385067720/pipeline\_dsl.json",
"runtime\_conf\_on\_party\_path": "/data/projects/fate/fateflow/jobs/202205070731385067720/guest/9999/job\_runtime\_on\_party\_conf.json",
"runtime\_conf\_path": "/data/projects/fate/fateflow/jobs/202205070731385067720/job\_runtime\_conf.json",
"train\_runtime\_conf\_path": "/data/projects/fate/fateflow/jobs/202205070731385067720/train\_runtime\_conf.json"
},
"jobId": "202205070731385067720",
"retcode": 0,
"retmsg": "success"
}
6、 ... and 、 View forecast results
Can be returned by board_url
perhaps job_id
Go to FATE Board
View results in , But the graphical interface can only be viewed at most 100 Bar record ;
We can go through output-data
command , Export all data output of the specified component :
flow tracking output-data -j 202205070731385067720 -r guest -p 9999 -cpn hetero_lr_0 -o /data/projects/fate/examples/my_test/predict
- -j: Specify the... Of the forecast task job_id
- -cpn: Specify the component name .
- -o: Specify the output directory .
Return after successful execution :
{
"retcode": 0,
"directory": "/data/projects/fate/examples/my\_test/predict/job\_202205070731385067720\_hetero\_lr\_0\_guest\_9999\_output\_data",
"retmsg": "Download successfully, please check /data/projects/fate/examples/my\_test/predict/job\_202205070731385067720\_hetero\_lr\_0\_guest\_9999\_output\_data directory"
}
In the catalog /data/projects/fate/examples/my_test/predict/job_202205070731385067720_hetero_lr_0_guest_9999_output_data
You can see two files in :
- data.csv: For all data output .
- data.meta: Is the column header of the data .
Code scanning, attention, surprise !
边栏推荐
- How to use 200 lines of code to implement Scala's Object Converter
- AcWing 第57 场周赛
- 全球芯片市场或陷入停滞,中国芯片逆势扩张加速提升自给率
- Getting to know cloud native security for the first time: the best guarantee in the cloud Era
- Firewall foundation Huawei H3C firewall web page login
- 【PHP代码注入】PHP语言常见可注入函数以及PHP代码注入漏洞的利用实例
- Four characteristics of transactions
- 美国芯片再遭重击,继Intel后又一家芯片企业将被中国芯片超越
- 一次性彻底解决 Web 工程中文乱码问题
- [PHP code injection] common injectable functions of PHP language and utilization examples of PHP code injection vulnerabilities
猜你喜欢
AGCO AI frontier promotion (6.27)
清华&商汤&上海AI&CUHK提出Siamese Image Modeling,兼具linear probing和密集预测性能!...
After the deployment is created, the pod problem handling cannot be created
With the advent of the era of Internet of everything, Ruijie released a scenario based wireless zero roaming scheme
How to solve the problem of missing language bar in win10 system
Embedded development: embedded foundation callback function
Half find (half find)
国产数据库乱象
External memory
芯片供给过剩之际,进口最多的中国继续减少进口,美国芯片慌了
随机推荐
Cesium实现卫星在轨绕行
隐私计算FATE-离线预测
Kotlin函数使用示例教程
【业务安全-02】业务数据安全测试及商品订购数量篡改实例
力扣 第 81 场双周赛
ENSP cloud configuration
Openhgnn releases version 0.3
ensp云朵配置
类模板中可变参的逐步展开
Naacl 2022 | TAMT: search the transportable Bert subnet through downstream task independent mask training
A statistical problem of shell script
Firewall foundation Huawei H3C firewall web page login
How to use 200 lines of code to implement Scala's Object Converter
做一篇人人能搞懂的ThreadLocal(源码)
[安洵杯 2019]Attack
Bidding announcement: Oracle database maintenance service procurement of the First Affiliated Hospital of Jinan University
Shell 简明教程
JVM parameter setting and analysis
After the deployment is created, the pod problem handling cannot be created
重读经典:《The Craft of Research(1)》