Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
3986fc14
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看板
提交
3986fc14
编写于
6月 16, 2020
作者:
B
barrierye
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
combine multiprocess version, multithread version, brpc version and grpc version
上级
21cb64c6
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
672 addition
and
2448 deletion
+672
-2448
python/examples/imdb/test_py_server.py
python/examples/imdb/test_py_server.py
+8
-4
python/paddle_serving_server/pyserver.py
python/paddle_serving_server/pyserver.py
+332
-103
python/paddle_serving_server/pyserver_multithread.py
python/paddle_serving_server/pyserver_multithread.py
+0
-1119
python/paddle_serving_server_gpu/pyserver.py
python/paddle_serving_server_gpu/pyserver.py
+332
-103
python/paddle_serving_server_gpu/pyserver_multithread.py
python/paddle_serving_server_gpu/pyserver_multithread.py
+0
-1119
未找到文件。
python/examples/imdb/test_py_server.py
浏览文件 @
3986fc14
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
# pylint: disable=doc-string-missing
# pylint: disable=doc-string-missing
from
paddle_serving_server.pyserver
import
Op
from
paddle_serving_server.pyserver
import
Op
from
paddle_serving_server.pyserver
import
Channel
from
paddle_serving_server.pyserver
import
PyServer
from
paddle_serving_server.pyserver
import
PyServer
import
numpy
as
np
import
numpy
as
np
import
logging
import
logging
...
@@ -41,10 +40,10 @@ read_op = Op(name="read", inputs=None)
...
@@ -41,10 +40,10 @@ read_op = Op(name="read", inputs=None)
bow_op
=
Op
(
name
=
"bow"
,
bow_op
=
Op
(
name
=
"bow"
,
inputs
=
[
read_op
],
inputs
=
[
read_op
],
server_model
=
"imdb_bow_model"
,
server_model
=
"imdb_bow_model"
,
server_port
=
"9
393
"
,
server_port
=
"9
292
"
,
device
=
"cpu"
,
device
=
"cpu"
,
client_config
=
"imdb_bow_client_conf/serving_client_conf.prototxt"
,
client_config
=
"imdb_bow_client_conf/serving_client_conf.prototxt"
,
server_name
=
"127.0.0.1:9
393
"
,
server_name
=
"127.0.0.1:9
292
"
,
fetch_names
=
[
"prediction"
],
fetch_names
=
[
"prediction"
],
concurrency
=
1
,
concurrency
=
1
,
timeout
=
0.1
,
timeout
=
0.1
,
...
@@ -63,7 +62,12 @@ cnn_op = Op(name="cnn",
...
@@ -63,7 +62,12 @@ cnn_op = Op(name="cnn",
combine_op
=
CombineOp
(
combine_op
=
CombineOp
(
name
=
"combine"
,
inputs
=
[
bow_op
,
cnn_op
],
concurrency
=
1
,
timeout
=-
1
,
retry
=
1
)
name
=
"combine"
,
inputs
=
[
bow_op
,
cnn_op
],
concurrency
=
1
,
timeout
=-
1
,
retry
=
1
)
pyserver
=
PyServer
(
profile
=
False
,
retry
=
1
)
pyserver
=
PyServer
(
use_multithread
=
True
,
client_type
=
'grpc'
,
use_future
=
False
,
profile
=
False
,
retry
=
1
)
pyserver
.
add_ops
([
read_op
,
bow_op
,
cnn_op
,
combine_op
])
pyserver
.
add_ops
([
read_op
,
bow_op
,
cnn_op
,
combine_op
])
pyserver
.
prepare_server
(
port
=
8080
,
worker_num
=
2
)
pyserver
.
prepare_server
(
port
=
8080
,
worker_num
=
2
)
pyserver
.
run_server
()
pyserver
.
run_server
()
python/paddle_serving_server/pyserver
_multiprocess
.py
→
python/paddle_serving_server/pyserver.py
浏览文件 @
3986fc14
此差异已折叠。
点击以展开。
python/paddle_serving_server/pyserver_multithread.py
已删除
100644 → 0
浏览文件 @
21cb64c6
此差异已折叠。
点击以展开。
python/paddle_serving_server_gpu/pyserver
_multiprocess
.py
→
python/paddle_serving_server_gpu/pyserver.py
浏览文件 @
3986fc14
此差异已折叠。
点击以展开。
python/paddle_serving_server_gpu/pyserver_multithread.py
已删除
100644 → 0
浏览文件 @
21cb64c6
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录