README.md 4.4 KB
Newer Older
D
Dong Daxiang 已提交
1 2
<p align="center">
    <br>
D
Dong Daxiang 已提交
3
<img src='https://paddle-serving.bj.bcebos.com/imdb-demo%2FLogoMakr-3Bd2NM-300dpi.png' width = "600" height = "130">
D
Dong Daxiang 已提交
4 5 6 7 8
    <br>
<p>
    
<p align="center">
    <br>
B
barrierye 已提交
9 10 11
    <a href="https://travis-ci.com/PaddlePaddle/Serving">
        <img alt="Build Status" src="https://img.shields.io/travis/com/PaddlePaddle/Serving/develop">
    </a>
D
Dong Daxiang 已提交
12 13 14 15
    <img alt="Release" src="https://img.shields.io/badge/Release-0.0.3-yellowgreen">
    <img alt="Issues" src="https://img.shields.io/github/issues/PaddlePaddle/Serving">
    <img alt="License" src="https://img.shields.io/github/license/PaddlePaddle/Serving">
    <img alt="Slack" src="https://img.shields.io/badge/Join-Slack-green">
D
Dong Daxiang 已提交
16 17
    <br>
<p>
D
Dong Daxiang 已提交
18

D
Dong Daxiang 已提交
19
[中文](https://github.com/PaddlePaddle/Serving/blob/develop/README_CN.md)
D
Dong Daxiang 已提交
20

D
Dong Daxiang 已提交
21
## Motivation
D
Dong Daxiang 已提交
22
Paddle Serving helps deep learning developers deploy an online inference service without much effort. **The goal of this project**: once you have trained a deep neural nets with [Paddle](https://github.com/PaddlePaddle/Paddle), you already have a model inference service. A demo of serving is as follows:
D
Dong Daxiang 已提交
23
<p align="center">
D
Dong Daxiang 已提交
24
    <img src="doc/demo.gif" width="700">
D
Dong Daxiang 已提交
25
</p>
D
Dong Daxiang 已提交
26

D
Dong Daxiang 已提交
27
## Key Features
D
Dong Daxiang 已提交
28
- Integrate with Paddle training pipeline seemlessly, most paddle models can be deployed **with one line command**.
D
Dong Daxiang 已提交
29 30 31
- **Industrial serving features** supported, such as models management, online loading, online A/B testing etc.
- **Distributed Key-Value indexing** supported that is especially useful for large scale sparse features as model inputs.
- **Highly concurrent and efficient communication** between clients and servers.
D
Dong Daxiang 已提交
32
- **Multiple programming languages** supported on client side, such as Golang, C++ and python
D
Dong Daxiang 已提交
33
- **Extensible framework design** that can support model serving beyond Paddle.
D
Dong Daxiang 已提交
34

D
Dong Daxiang 已提交
35
## Installation
D
Dong Daxiang 已提交
36 37 38 39 40 41

```shell
pip install paddle-serving-client
pip install paddle-serving-server
```

D
Dong Daxiang 已提交
42 43
## Quick Start Example

D
Dong Daxiang 已提交
44
### Boston House Price Prediction model
D
Dong Daxiang 已提交
45
``` shell
D
Dong Daxiang 已提交
46
wget --no-check-certificate https://paddle-serving.bj.bcebos.com/uci_housing.tar.gz
D
Dong Daxiang 已提交
47
tar -xzf uci_housing.tar.gz
D
Dong Daxiang 已提交
48
```
D
Dong Daxiang 已提交
49

D
Dong Daxiang 已提交
50 51
Paddle Serving provides HTTP and RPC based service for users to access

D
Dong Daxiang 已提交
52
### HTTP service
D
Dong Daxiang 已提交
53 54

``` shell
D
Dong Daxiang 已提交
55
python -m paddle_serving_server.web_serve --model uci_housing_model --thread 10 --port 9292 --name uci
D
Dong Daxiang 已提交
56
```
D
Dong Daxiang 已提交
57 58 59
``` shell
curl -H "Content-Type:application/json" -X POST -d '{"x": [0.0137, -0.1136, 0.2553, -0.0692, 0.0582, -0.0727, -0.1583, -0.0584, 0.6283, 0.4919, 0.1856, 0.0795, -0.0332], "fetch":["price"]}' http://127.0.0.1:9292/uci/prediction
```
D
Dong Daxiang 已提交
60

D
Dong Daxiang 已提交
61
### RPC service
D
Dong Daxiang 已提交
62 63 64 65

``` shell
python -m paddle_serving_server.serve --model uci_housing_model --thread 10 --port 9292
```
D
Dong Daxiang 已提交
66

D
Dong Daxiang 已提交
67
``` python
D
Dong Daxiang 已提交
68
# A user can visit rpc service through paddle_serving_client API
D
Dong Daxiang 已提交
69 70 71
from paddle_serving_client import Client

client = Client()
D
Dong Daxiang 已提交
72
client.load_client_config("uci_housing_client/serving_client_conf.prototxt")
D
Dong Daxiang 已提交
73
client.connect(["127.0.0.1:9292"])
D
Dong Daxiang 已提交
74
data = [0.0137, -0.1136, 0.2553, -0.0692, 0.0582, -0.0727,
D
Dong Daxiang 已提交
75
        -0.1583, -0.0584, 0.6283, 0.4919, 0.1856, 0.0795, -0.0332]
D
Dong Daxiang 已提交
76
fetch_map = client.predict(feed={"x": data}, fetch=["price"])
D
Dong Daxiang 已提交
77
print(fetch_map)
D
Dong Daxiang 已提交
78 79 80

```

D
Dong Daxiang 已提交
81 82 83 84 85 86 87 88 89 90 91 92 93 94
## Models waiting for you to deploy


<center>

|      Model Name      	|              Resnet50              	|
|:--------------------:	|:----------------------------------:	|
|      Package URL     	|           To be released           	|
|      Description     	| Get the representation of an image 	|
| Training Data Source 	|              Imagenet              	|

</center>


D
Dong Daxiang 已提交
95
## Document
D
Dong Daxiang 已提交
96

D
Dong Daxiang 已提交
97
[How to save a servable model?](doc/SAVE.md)
D
Dong Daxiang 已提交
98

D
Dong Daxiang 已提交
99
[How to config Serving native operators on server side?](doc/SERVER_DAG.md)
D
Dong Daxiang 已提交
100

D
Dong Daxiang 已提交
101
[How to develop a new Serving operator](doc/NEW_OPERATOR.md)
D
Dong Daxiang 已提交
102

D
Dong Daxiang 已提交
103
[Golang client](doc/IMDB_GO_CLIENT.md)
D
Dong Daxiang 已提交
104

D
Dong Daxiang 已提交
105
[Compile from source code(Chinese)](doc/COMPILE.md)
D
Dong Daxiang 已提交
106

D
Dong Daxiang 已提交
107 108
[How profile serving efficiency?(Chinese)](https://github.com/PaddlePaddle/Serving/tree/develop/python/examples/util)

D
Dong Daxiang 已提交
109 110
[FAQ(Chinese)](doc/FAQ.md)

D
Dong Daxiang 已提交
111 112
[Design Doc(Chinese)](doc/DESIGN.md)

D
Dong Daxiang 已提交
113 114 115
## Join Community
To connect with other users and contributors, welcome to join our [Slack channel](https://paddleserving.slack.com/archives/CUBPKHKMJ)

D
Dong Daxiang 已提交
116 117
## Contribution

D
Dong Daxiang 已提交
118
If you want to contribute code to Paddle Serving, please reference [Contribution Guidelines](doc/CONTRIBUTE.md)
D
Dong Daxiang 已提交
119 120 121 122 123 124

### Feedback
For any feedback or to report a bug, please propose a [GitHub Issue](https://github.com/PaddlePaddle/Serving/issues).

## License
[Apache 2.0 License](https://github.com/PaddlePaddle/Serving/blob/develop/LICENSE)