当前位置:网站首页>Privacy computing fat----- offline prediction
Privacy computing fat----- offline prediction
2022-06-28 08:33:00 【Gegwu MMQ!!】
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 .
边栏推荐
- Tree
- PLSQL installation under Windows
- 【云原生 | Kubernetes篇】深入了解Pod(六)
- 887. egg drop
- 安装nrm后,使用nrm命令报错internal/validators.js:124 throw new ERR_INVALID_ARG_TYPE(name, ‘string‘, value)
- Anniversary party
- 神殿
- Integer partition
- Modifying the SSH default port when installing Oracle RAC makes CRS unable to install
- 【.NET6】gRPC服务端和客户端开发案例,以及minimal API服务、gRPC服务和传统webapi服务的访问效率大对决
猜你喜欢
随机推荐
DELL R730服务器开机报错:[XXX] usb 1-1-port4: disabled by hub (EMI?), re-enabling...
Oracle RAC -- understanding of VIP
Superimposed ladder diagram and line diagram and merged line diagram and needle diagram
Wasmedge 0.10.0 release! New plug-in extension mechanism, socket API enhancement, llvm 14 support
Unity gets the coordinate point in front of the current object at a certain angle and distance
IO error in Oracle11g: got minus one from a read call
Installing mysql5.7 under Windows
Build an integrated kubernetes in Fedora
Force buckle 1884 Egg drop - two eggs
Redis deployment under Linux & redis startup
How do individuals open accounts to speculate in stocks? Is online account opening safe?
AWS saves data on the cloud (3)
关于在cmd中MySQL不能插中文数据的原因
How to choose an account opening broker? Is it safe to open an account online?
新唐NUC980使用记录:自制开发板(基于NUC980DK61YC)
CloudCompare&PCL 点云裁剪(基于封闭曲面或多边形)
Little artist huangxinyang was invited to participate in the Wuhan station of children's unit of Paris Fashion Week
Oracle view all tablespaces in the current library
DB
Set<String>




![[learning notes] matroid](/img/e3/4e003f5d89752306ea901c70230deb.png)




