
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 Refer to the article for the installation and deployment of 《 Privacy computing FATE- Concept 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_testUnder 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 !

Privacy computing FATE- More articles about offline Forecasting
- HMM Probability calculation problem and prediction problem java Realization
HMM(hidden markov model) It can be used for pattern recognition , Teacher Li Kaifu just adopted HMM Completed speech recognition . The following example comes from < Statistical learning method > One HMM From the initial probability distribution , State transition probability distribution , ...
- use MATLAB Generate fuzzy control offline query table
The data obtained by real-time sampling is input into the machine after fuzzy processing , The output fuzzy quantity can be obtained by querying the fuzzy rule table , Thus, the approximate reasoning process is avoided . Practical application , Especially when the control system is simple and controlled by single chip microcomputer , This method of looking up tables is often used . Fuzzy control table ...
- Others- Ali expert Qiang Qi : Design and implementation of flow computing system
Ali expert Qiang Qi : Design and implementation of flow computing system More in-depth articles , Please follow the cloud computing channel :https://yq.aliyun.com/cloud Qiang Qi of Alibaba cloud data business department brings you a message entitled “ Design and implementation of flow computing system ” Speech , Ben ...
- Big data day 16 —— Flow computing is storm Detailed explanation ( One ) Getting started with cluster installation
One . summary Today, we are officially in the flow computing . Let's first explain the concept of streaming computing Offline computing Offline computing : Get data in bulk . Bulk data transfer . Periodic batch calculation data . Data presentation For technology :Sqoop Bulk import data .HDFS Mass storage of data ...
- About k8s This big move , It indicates that edge computing will usher in “ Open source ” A new cycle of development ……
In the article < Recently in the field of edge computing , There's a big event in the history of the Internet of things …> I once mentioned Kubernetes( abbreviation K8s) From a very large-scale cloud computing environment , It is brought into the edge computing scene of the Internet of things . There's something new going on , From this week ...
- 【Streaming】30 Minute Overview Spark Streaming Real time computing
This paper mainly introduces four problems : What is? Spark Streaming Real time computing ? Spark What is the principle and process of real-time computing ? Spark 2.X Next generation real-time computing framework Structured Streaming Spark S ...
- Titanic Survival prediction analysis (Kaggle)
Share an article kaggle Entry level cases , Analysis of the Titanic's survival and death . Reference article : Technology world , Link to the original text http://www.jasongj.com/ml/classification/ Content of case analysis : Through training set ...
- Ensembl Description of mutation data ( One )—— Mutation species database and prediction tools
The following is right Ensembl Description of the data stored in the mutation database , about Ensembl Different species in the database , We come from a variety of sources ( for example ,dbSNP database ) Import mutation data (SNP.CNV. Allele frequency . Genotype, etc ), Imported mutation data ...
- The linear regression algorithm of machine learning is used to predict the stock trend ( use Python Realization )
In my new book , It will be told through the stock case Python Knowledge point , Let's learn Python At the same time, they can also master relevant stock knowledge , So called kill two birds with one stone . Here is a case of forecasting stocks by linear regression algorithm , To narrate through Python Of sklearn ...
- This article gives you a thorough understanding of big data real-time computing engine Flink
Preface In the last article Does your company need to introduce real-time computing engine ? I explained the common real-time requirements in daily life , Then it analyzes the implementation of these requirements , Then it compares real-time computing with off-line computing . With the rapid development of big data in these years , There are also many calculation frameworks ...
Random recommendation
- js in cookie Use
js There is no encapsulated storage in cookie, obtain cookie And delete cookie Function of , So you have to deal with it manually , also cookie You can only store strings in , Cannot store complex data types such as arrays . // add to cookie fu ...
- Shtml Ingenious use
shtml It's using SSI Instructions , SSI There are not many instructions But it's relatively powerful , stay PHP When the command execution function is disabled and the security mode is on, you can try it It can also be uploaded on the server shtml Try suffix script PS: only ...
- SPRING IN ACTION The first 4 I'll take notes - Chapter nine Securing web applications-006- use LDAP Compare passwords (passwordCompare()、passwordAttribute("passcode")、passwordEncoder(new Md5PasswordEncoder()))
One . The default strategy for authenticating against LDAP is to perform a bind operation,authenticatin ...
- OS-MAC: An Efficient MAC Protocol for Spectrum-Agile Wireless Networks
IEEE TRANSACTIONS ON MOBILE COMPUTING, VOL. 7, NO. 8, AUGUST 2008 As I said before , This is a out-of-band local cove ...
- Hadoop2.6.0 Adding nodes dynamically
This article mainly from the basic preparation , add to DataNode And add NodeManager Three parts are detailed in Hadoop2.6.0 In the environment , How to add nodes to the cluster dynamically . Basic preparation In the basic preparation part , It's mainly about setting up hadoop The running system ...
- Safety exit app,activoty Stack management
Preface Because a classmate asked me how to follow a good process to go back to the home page , I've seen it before 4 Solutions , Later I found it necessary to make a record and summary , I wrote this blog post .( Xiaoqiang has written an article before , Here through their own analysis, a complete summary of the following 6 Kind of plan ...
- css Text and typesetting
Catalog Text and typography `font Writing style Typography (text) The text is translucent Text shadow Background and color basic Brief background The background is transparent Background zoom A list of the style Table style Table border styles Fold the border Set width and height Form pair ...
- Luogu AT667 【 The world has a lot of manpower 】
Topic link https://www.luogu.org/problemnew/show/AT667 The title describes something , I can't understand Just a translation : Read in several strings , Find the order of the dictionary 7 And output . thank @da32 ...
- headers Replace script
python Code headers = """ Accept: */* Accept-Encoding: gzip, deflate, br Accept-Language ...
- django admin Background settings
#encoding:utf-8 from django.contrib import admin from son10.models import * # Register your models h ...


![[200 opencv routines] 212 Draw a slanted rectangle](/img/cf/da8fff386d011c939946326c55671f.png)

![leetcode:968. Monitor the binary tree [tree DP, maintain the three states of each node's subtree, it is very difficult to think of the right as a learning, analogous to the house raiding 3]](/img/70/3954b0871cc31d24ae016eb99d871e.png)




