Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
1aa4df30
S
Serving
项目概览
PaddlePaddle
/
Serving
1 年多 前同步成功
通知
186
Star
833
Fork
253
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
105
列表
看板
标记
里程碑
合并请求
10
Wiki
2
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Serving
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
105
Issue
105
列表
看板
标记
里程碑
合并请求
10
合并请求
10
Pages
分析
分析
仓库分析
DevOps
Wiki
2
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1aa4df30
编写于
1月 10, 2021
作者:
W
wangjiawei04
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix serving_build
上级
4cf9c513
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
6 addition
and
37 deletion
+6
-37
tools/serving_build.sh
tools/serving_build.sh
+6
-37
未找到文件。
tools/serving_build.sh
浏览文件 @
1aa4df30
...
...
@@ -174,7 +174,7 @@ function python_test_fit_a_line() {
# test web
unsetproxy
# maybe the proxy is used on iPipe, which makes web-test failed.
check_cmd
"python
-m paddle_serving_server.serve --model uci_housing_model --name uci --port 9393 --thread 4 --name uci
> /dev/null &"
check_cmd
"python
test_server.py
> /dev/null &"
sleep
5
# wait for the server to start
check_cmd
"curl -H
\"
Content-Type:application/json
\"
-X POST -d '{
\"
feed
\"
:[{
\"
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:9393/uci/prediction"
# check http code
...
...
@@ -183,14 +183,6 @@ function python_test_fit_a_line() {
echo
"HTTP status code -ne 200"
exit
1
fi
# test web batch
check_cmd
"curl -H
\"
Content-Type:application/json
\"
-X POST -d '{
\"
feed
\"
:[{
\"
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]}, {
\"
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:9393/uci/prediction"
# check http code
http_code
=
`
curl
-H
"Content-Type:application/json"
-X
POST
-d
'{"feed":[{"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]}, {"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"]}'
-s
-w
"%{http_code}"
-o
/dev/null http://127.0.0.1:9393/uci/prediction
`
if
[
${
http_code
}
-ne
200
]
;
then
echo
"HTTP status code -ne 200"
exit
1
fi
setproxy
# recover proxy state
kill_server_process
;;
...
...
@@ -202,27 +194,6 @@ function python_test_fit_a_line() {
check_cmd
"python test_client.py uci_housing_client/serving_client_conf.prototxt > /dev/null"
kill_server_process
# test web
#unsetproxy # maybe the proxy is used on iPipe, which makes web-test failed.
#check_cmd "python -m paddle_serving_server_gpu.serve --model uci_housing_model --port 9393 --thread 2 --gpu_ids 0 --name uci > /dev/null &"
#sleep 5 # wait for the server to start
#check_cmd "curl -H \"Content-Type:application/json\" -X POST -d '{\"feed\":[{\"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:9393/uci/prediction"
# check http code
#http_code=`curl -H "Content-Type:application/json" -X POST -d '{"feed":[{"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"]}' -s -w "%{http_code}" -o /dev/null http://127.0.0.1:9393/uci/prediction`
#if [ ${http_code} -ne 200 ]; then
# echo "HTTP status code -ne 200"
# exit 1
#fi
# test web batch
#check_cmd "curl -H \"Content-Type:application/json\" -X POST -d '{\"feed\":[{\"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]}, {\"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:9393/uci/prediction"
# check http code
#http_code=`curl -H "Content-Type:application/json" -X POST -d '{"feed":[{"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]}, {"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"]}' -s -w "%{http_code}" -o /dev/null http://127.0.0.1:9393/uci/prediction`
#if [ ${http_code} -ne 200 ]; then
# echo "HTTP status code -ne 200"
# exit 1
#fi
#setproxy # recover proxy state
#kill_server_process
;;
*
)
echo
"error type"
...
...
@@ -589,7 +560,6 @@ function python_test_grpc_impl() {
sleep
5
# wait for the server to start
check_cmd
"python test_sync_client.py > /dev/null"
check_cmd
"python test_asyn_client.py > /dev/null"
check_cmd
"python test_batch_client.py > /dev/null"
check_cmd
"python test_timeout_client.py > /dev/null"
kill_server_process
kill_process_by_port 9393
...
...
@@ -598,7 +568,6 @@ function python_test_grpc_impl() {
sleep
5
# wait for the server to start
check_cmd
"python test_sync_client.py > /dev/null"
check_cmd
"python test_asyn_client.py > /dev/null"
check_cmd
"python test_batch_client.py > /dev/null"
check_cmd
"python test_timeout_client.py > /dev/null"
kill_server_process
kill_process_by_port 9393
...
...
@@ -647,7 +616,7 @@ COMMENT
sleep
5
# wait for the server to start
check_cmd
"python test_sync_client.py > /dev/null"
check_cmd
"python test_asyn_client.py > /dev/null"
check_cmd
"python test_batch_client.py > /dev/null"
#
check_cmd "python test_batch_client.py > /dev/null"
check_cmd
"python test_timeout_client.py > /dev/null"
kill_server_process
kill_process_by_port 9393
...
...
@@ -656,7 +625,7 @@ COMMENT
sleep
5
# wait for the server to start
check_cmd
"python test_sync_client.py > /dev/null"
check_cmd
"python test_asyn_client.py > /dev/null"
check_cmd
"python test_batch_client.py > /dev/null"
#
check_cmd "python test_batch_client.py > /dev/null"
check_cmd
"python test_timeout_client.py > /dev/null"
kill_server_process
kill_process_by_port 9393
...
...
@@ -1095,9 +1064,9 @@ function monitor_test() {
function
main
()
{
local
TYPE
=
$1
# pwd: /
init
# pwd: /Serving
build_client
$TYPE
# pwd: /Serving
build_server
$TYPE
# pwd: /Serving
build_app
$TYPE
# pwd: /Serving
#
build_client $TYPE # pwd: /Serving
#
build_server $TYPE # pwd: /Serving
#
build_app $TYPE # pwd: /Serving
java_run_test
$TYPE
# pwd: /Serving
python_run_test
$TYPE
# pwd: /Serving
#monitor_test $TYPE # pwd: /Serving
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录