You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deploy/python_serving/readme_en.md
+48-7
Original file line number
Diff line number
Diff line change
@@ -123,22 +123,63 @@ fetch_var {
123
123
124
124
```
125
125
### Service deployment and requests
126
-
The paddleserving directory contains the code for starting the pipeline service, C++ serving service (TODO) and sending prediction requests, including:
126
+
The `python_serving` directory contains the code for starting the pipeline service, C++ serving service (TODO) and sending prediction requests, including:
127
127
```bash
128
128
__init__.py
129
-
configs/xxx.yaml # start the configuration file of the pipeline service
130
-
pipeline_http_client.py # python script for sending pipeline prediction request via http
131
-
pipeline_rpc_client.py # python script for sending pipeline prediction request in rpc mode
132
-
recognition_web_service.py # python script that starts the pipeline server
129
+
configs/xxx.yaml # start the configuration file of the pipeline service
130
+
pipeline_http_client.py # python script for sending pipeline prediction request via http
131
+
pipeline_rpc_client.py # python script for sending pipeline prediction request in rpc mode
132
+
recognition_web_service.py # python script that starts the pipeline server
133
+
utils.py # common functions used in inference, such as parse_file_paths, numpy_to_base64, video_to_numpy
133
134
```
134
135
#### Python Serving
135
136
- Go to the working directory:
136
137
```bash
137
-
cd deploy/paddleserving
138
+
cd deploy/python_serving
138
139
```
139
140
140
141
- Start the service:
141
142
```bash
142
143
# Start in the current command line window and stay in front
PipelineClient::predict before time:1645631086.8485317
166
+
key: "label"
167
+
key: "prob"
168
+
value: "[\'archery\']"
169
+
value: "[0.9907388687133789]"
170
+
```
171
+
172
+
## FAQ
173
+
**Q1**: No result is returned after the request is sent or an output decoding error is prompted
174
+
175
+
**A1**: Do not set the proxy when starting the service and sending the request. You can close the proxy before starting the service and sending the request. The command to close the proxy is:
176
+
```
177
+
unset https_proxy
178
+
unset http_proxy
179
+
```
180
+
181
+
**Q2**: There is no response after the server is started, and it has been stopped at `start proxy service`
182
+
183
+
**A2**: It is likely that a problem was encountered during the startup process. You can view the detailed error message in the `./deploy/python_serving/PipelineServingLogs/pipeline.log` log file
184
+
185
+
For more service deployment types, such as `RPC prediction service`, you can refer to Serving's [github official website](https://github.com/PaddlePaddle/Serving/tree/v0.7.0/examples)
0 commit comments