README.md 812 字节
Newer Older
J
Jiawei Wang 已提交
1
## CTR Prediction Service
M
MRXLT 已提交
2

J
Jiawei Wang 已提交
3 4 5
([简体中文](./README_CN.md)|English)

### download criteo dataset
M
MRXLT 已提交
6 7 8 9
```
sh get_data.sh
```

J
Jiawei Wang 已提交
10
### download inference model
M
MRXLT 已提交
11
```
J
Jiawei Wang 已提交
12 13 14 15
wget https://paddle-serving.bj.bcebos.com/criteo_ctr_example/criteo_ctr_demo_model.tar.gz
tar xf criteo_ctr_demo_model.tar.gz
mv models/ctr_client_conf .
mv models/ctr_serving_model .
M
MRXLT 已提交
16
```
T
TeslaZhao 已提交
17
the directories like `ctr_serving_model` and `ctr_client_conf` will appear.
M
MRXLT 已提交
18

J
Jiawei Wang 已提交
19
### Start RPC Inference Service
M
MRXLT 已提交
20 21

```
T
TeslaZhao 已提交
22 23
python3 -m paddle_serving_server.serve --model ctr_serving_model/ --port 9292 #CPU RPC Service
python3 -m paddle_serving_server.serve --model ctr_serving_model/ --port 9292 --gpu_ids 0 #RPC Service on GPU 0
M
MRXLT 已提交
24 25
```

J
Jiawei Wang 已提交
26
### RPC Infer
M
MRXLT 已提交
27 28

```
T
TeslaZhao 已提交
29
python3 test_client.py ctr_client_conf/serving_client_conf.prototxt raw_data/part-0
M
MRXLT 已提交
30
```
J
Jiawei Wang 已提交
31
the latency will display in the end.