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
paddler serving部署文本匹配的ernie_tiny后,curl -H "Content-Type:application/json" -X POST -d '{"Data":[['世界上什么东西最小', '世界上什么东西最小?']] , "fetch":["prediction"]}' http://172.0.0.1:9292/ernie/prediction,返回
400 Bad Request
Bad Request
The browser (or proxy) sent a request that this server could not understand.
将ernin_tiny的训练模型转为paddle serving模型,ernie_tiny_model包含如下文件
total 350716
drwxrwxr-x 2 media media 4096 Mar 24 09:43 ./
drwxrwxr-x 4 media media 4096 Mar 24 09:44 ../
-rw-rw-r-- 1 media media 656906 Mar 24 09:43 model
-rw-rw-r-- 1 media media 358454636 Mar 24 09:43 params
-rw-rw-r-- 1 media media 356 Mar 24 09:43 serving_server_conf.prototxt
-rw-rw-r-- 1 media media 147 Mar 24 09:43 serving_server_conf.stream.prototxt
paddler serving部署文本匹配的ernie_tiny后,curl -H "Content-Type:application/json" -X POST -d '{"Data":[['世界上什么东西最小', '世界上什么东西最小?']] , "fetch":["prediction"]}' http://172.0.0.1:9292/ernie/prediction,返回
400 Bad Request
Bad Request
The browser (or proxy) sent a request that this server could not understand.
请问是传入参数格式不对吗?还是操作步骤不正确呢?谢谢!
完整的操作步骤如下:
获取docker 镜像 registry.baidubce.com/paddlepaddle/serving:0.5.0-cuda10.2-cudnn8-devel
容器内依次安装 paddle-serving-server-gpu==0.5.0.post102,paddlepaddle-gpu==2.0.0 和paddle_serving_client
将ernin_tiny的训练模型转为paddle serving模型,ernie_tiny_model包含如下文件
total 350716
drwxrwxr-x 2 media media 4096 Mar 24 09:43 ./
drwxrwxr-x 4 media media 4096 Mar 24 09:44 ../
-rw-rw-r-- 1 media media 656906 Mar 24 09:43 model
-rw-rw-r-- 1 media media 358454636 Mar 24 09:43 params
-rw-rw-r-- 1 media media 356 Mar 24 09:43 serving_server_conf.prototxt
-rw-rw-r-- 1 media media 147 Mar 24 09:43 serving_server_conf.stream.prototxt
将步骤#3中生成的ernie_tiny_model和ernie_tiny_client拷贝到docker/home/workspace/Serving/python/examples/ernie_tiny 中
使用uwsgi启动服务
from paddle_serving_server.web_service import WebService
uci_service = WebService(name="ernie")
uci_service.load_model_config("./ernie_tiny_model")
uci_service.prepare_server(workdir="./workdir", port=int(9500), device="cpu")
uci_service.run_rpc_service()
app_instance = uci_service.get_app_instance()
启动服务 uwsgi --http :9292 --module uwsgi_service:app_instance
The text was updated successfully, but these errors were encountered: