Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
e3dfec3c
S
Serving
项目概览
PaddlePaddle
/
Serving
大约 1 年 前同步成功
通知
185
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e3dfec3c
编写于
11月 05, 2020
作者:
W
wangjiawei04
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix code style
上级
282c7c8d
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
17 addition
and
11 deletion
+17
-11
python/examples/faster_rcnn_model/test_client.py
python/examples/faster_rcnn_model/test_client.py
+2
-1
python/examples/imdb/benchmark.py
python/examples/imdb/benchmark.py
+9
-5
python/examples/yolov4/test_client.py
python/examples/yolov4/test_client.py
+2
-1
python/pipeline/operator.py
python/pipeline/operator.py
+2
-2
tools/cpp_examples/bert-gpu-serving/paddle-gpu-serving/setup.py
...cpp_examples/bert-gpu-serving/paddle-gpu-serving/setup.py
+1
-1
tools/serving_build.sh
tools/serving_build.sh
+1
-1
未找到文件。
python/examples/faster_rcnn_model/test_client.py
浏览文件 @
e3dfec3c
...
...
@@ -36,6 +36,7 @@ fetch_map = client.predict(
"im_info"
:
np
.
array
(
list
(
im
.
shape
[
1
:])
+
[
1.0
]),
"im_shape"
:
np
.
array
(
list
(
im
.
shape
[
1
:])
+
[
1.0
])
},
fetch
=
[
"multiclass_nms"
],
batch
=
False
)
fetch
=
[
"multiclass_nms"
],
batch
=
False
)
fetch_map
[
"image"
]
=
sys
.
argv
[
3
]
postprocess
(
fetch_map
)
python/examples/imdb/benchmark.py
浏览文件 @
e3dfec3c
...
...
@@ -48,13 +48,17 @@ def single_func(idx, resource):
for
i
in
range
(
1000
):
if
args
.
batch_size
>=
1
:
feed_batch
=
[]
feed
=
{
"words"
:
[],
"words.lod"
:[
0
]}
feed
=
{
"words"
:
[],
"words.lod"
:
[
0
]}
for
bi
in
range
(
args
.
batch_size
):
word_ids
,
label
=
imdb_dataset
.
get_words_and_label
(
dataset
[
bi
])
feed
[
"words.lod"
].
append
(
feed
[
"words.lod"
][
-
1
]
+
len
(
word_ids
))
word_ids
,
label
=
imdb_dataset
.
get_words_and_label
(
dataset
[
bi
])
feed
[
"words.lod"
].
append
(
feed
[
"words.lod"
][
-
1
]
+
len
(
word_ids
))
feed
[
"words"
].
extend
(
word_ids
)
feed
[
"words"
]
=
np
.
array
(
feed
[
"words"
]).
reshape
(
len
(
feed
[
"words"
]),
1
)
result
=
client
.
predict
(
feed
=
feed
,
fetch
=
[
"prediction"
],
batch
=
True
)
feed
[
"words"
]
=
np
.
array
(
feed
[
"words"
]).
reshape
(
len
(
feed
[
"words"
]),
1
)
result
=
client
.
predict
(
feed
=
feed
,
fetch
=
[
"prediction"
],
batch
=
True
)
if
result
is
None
:
raise
(
"predict failed."
)
else
:
...
...
python/examples/yolov4/test_client.py
浏览文件 @
e3dfec3c
...
...
@@ -35,6 +35,7 @@ fetch_map = client.predict(
"image"
:
im
,
"im_size"
:
np
.
array
(
list
(
im
.
shape
[
1
:])),
},
fetch
=
[
"save_infer_model/scale_0.tmp_0"
],
batch
=
False
)
fetch
=
[
"save_infer_model/scale_0.tmp_0"
],
batch
=
False
)
fetch_map
[
"image"
]
=
sys
.
argv
[
1
]
postprocess
(
fetch_map
)
python/pipeline/operator.py
浏览文件 @
e3dfec3c
...
...
@@ -843,8 +843,8 @@ class Op(object):
else
:
self
.
concurrency_idx
=
concurrency_idx
# init client
self
.
client
=
self
.
init_client
(
self
.
_client_config
,
self
.
_server_endpoints
)
self
.
client
=
self
.
init_client
(
self
.
_client_config
,
self
.
_server_endpoints
)
# user defined
self
.
init_op
()
...
...
tools/cpp_examples/bert-gpu-serving/paddle-gpu-serving/setup.py
浏览文件 @
e3dfec3c
...
...
@@ -23,7 +23,7 @@ info_content = open(info_py, 'r').readlines()
version_line
=
[
l
.
strip
()
for
l
in
info_content
if
l
.
startswith
(
'__version__'
)
][
0
]
exec
(
version_line
)
# produce __version__
exec
(
version_line
)
# produce __version__
setuptools
.
setup
(
name
=
"paddle-gpu-serving"
,
...
...
tools/serving_build.sh
浏览文件 @
e3dfec3c
...
...
@@ -1108,7 +1108,7 @@ function main() {
build_app
$TYPE
# pwd: /Serving
java_run_test
$TYPE
# pwd: /Serving
python_run_test
$TYPE
# pwd: /Serving
monitor_test
$TYPE
# pwd: /Serving
#
monitor_test $TYPE # pwd: /Serving
echo
"serving
$TYPE
part finished as expected."
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录