Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
857b5b78
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看板
未验证
提交
857b5b78
编写于
4月 03, 2020
作者:
M
MRXLT
提交者:
GitHub
4月 03, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #388 from MRXLT/0.2.0-cherry-v2
[cherry pick to 0.2.0] doc fix && add mem_optim
上级
a5f1624c
88b0a379
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
9 addition
and
1 deletion
+9
-1
README.md
README.md
+1
-1
python/paddle_serving_server/serve.py
python/paddle_serving_server/serve.py
+4
-0
python/paddle_serving_server_gpu/__init__.py
python/paddle_serving_server_gpu/__init__.py
+2
-0
python/paddle_serving_server_gpu/serve.py
python/paddle_serving_server_gpu/serve.py
+2
-0
未找到文件。
README.md
浏览文件 @
857b5b78
...
@@ -254,7 +254,7 @@ curl -H "Content-Type:application/json" -X POST -d '{"url": "https://paddle-serv
...
@@ -254,7 +254,7 @@ curl -H "Content-Type:application/json" -X POST -d '{"url": "https://paddle-serv
-
[
GPU Benchmarks(Chinese)
](
doc/GPU_BENCHMARKING.md
)
-
[
GPU Benchmarks(Chinese)
](
doc/GPU_BENCHMARKING.md
)
### FAQ
### FAQ
-
[
FAQ(Chinese)
](
doc/FAQ.md
)
-
[
FAQ(Chinese)
](
doc/
deprecated/
FAQ.md
)
### Design
### Design
...
...
python/paddle_serving_server/serve.py
浏览文件 @
857b5b78
...
@@ -38,6 +38,8 @@ def parse_args(): # pylint: disable=doc-string-missing
...
@@ -38,6 +38,8 @@ def parse_args(): # pylint: disable=doc-string-missing
help
=
"Working dir of current service"
)
help
=
"Working dir of current service"
)
parser
.
add_argument
(
parser
.
add_argument
(
"--device"
,
type
=
str
,
default
=
"cpu"
,
help
=
"Type of device"
)
"--device"
,
type
=
str
,
default
=
"cpu"
,
help
=
"Type of device"
)
parser
.
add_argument
(
"--mem_optim"
,
type
=
bool
,
default
=
False
,
help
=
"Memory optimize"
)
return
parser
.
parse_args
()
return
parser
.
parse_args
()
...
@@ -48,6 +50,7 @@ def start_standard_model(): # pylint: disable=doc-string-missing
...
@@ -48,6 +50,7 @@ def start_standard_model(): # pylint: disable=doc-string-missing
port
=
args
.
port
port
=
args
.
port
workdir
=
args
.
workdir
workdir
=
args
.
workdir
device
=
args
.
device
device
=
args
.
device
mem_optim
=
args
.
mem_optim
if
model
==
""
:
if
model
==
""
:
print
(
"You must specify your serving model"
)
print
(
"You must specify your serving model"
)
...
@@ -67,6 +70,7 @@ def start_standard_model(): # pylint: disable=doc-string-missing
...
@@ -67,6 +70,7 @@ def start_standard_model(): # pylint: disable=doc-string-missing
server
=
serving
.
Server
()
server
=
serving
.
Server
()
server
.
set_op_sequence
(
op_seq_maker
.
get_op_sequence
())
server
.
set_op_sequence
(
op_seq_maker
.
get_op_sequence
())
server
.
set_num_threads
(
thread_num
)
server
.
set_num_threads
(
thread_num
)
server
.
set_memory_optimize
(
mem_optim
)
server
.
load_model_config
(
model
)
server
.
load_model_config
(
model
)
server
.
prepare_server
(
workdir
=
workdir
,
port
=
port
,
device
=
device
)
server
.
prepare_server
(
workdir
=
workdir
,
port
=
port
,
device
=
device
)
...
...
python/paddle_serving_server_gpu/__init__.py
浏览文件 @
857b5b78
...
@@ -43,6 +43,8 @@ def serve_args():
...
@@ -43,6 +43,8 @@ def serve_args():
parser
.
add_argument
(
"--gpu_ids"
,
type
=
str
,
default
=
""
,
help
=
"gpu ids"
)
parser
.
add_argument
(
"--gpu_ids"
,
type
=
str
,
default
=
""
,
help
=
"gpu ids"
)
parser
.
add_argument
(
parser
.
add_argument
(
"--name"
,
type
=
str
,
default
=
"None"
,
help
=
"Default service name"
)
"--name"
,
type
=
str
,
default
=
"None"
,
help
=
"Default service name"
)
parser
.
add_argument
(
"--mem_optim"
,
type
=
bool
,
default
=
False
,
help
=
"Memory optimize"
)
return
parser
.
parse_args
()
return
parser
.
parse_args
()
...
...
python/paddle_serving_server_gpu/serve.py
浏览文件 @
857b5b78
...
@@ -33,6 +33,7 @@ def start_gpu_card_model(index, gpuid, args): # pylint: disable=doc-string-miss
...
@@ -33,6 +33,7 @@ def start_gpu_card_model(index, gpuid, args): # pylint: disable=doc-string-miss
port
=
args
.
port
+
index
port
=
args
.
port
+
index
thread_num
=
args
.
thread
thread_num
=
args
.
thread
model
=
args
.
model
model
=
args
.
model
mem_optim
=
args
.
mem_optim
workdir
=
"{}_{}"
.
format
(
args
.
workdir
,
gpuid
)
workdir
=
"{}_{}"
.
format
(
args
.
workdir
,
gpuid
)
if
model
==
""
:
if
model
==
""
:
...
@@ -53,6 +54,7 @@ def start_gpu_card_model(index, gpuid, args): # pylint: disable=doc-string-miss
...
@@ -53,6 +54,7 @@ def start_gpu_card_model(index, gpuid, args): # pylint: disable=doc-string-miss
server
=
serving
.
Server
()
server
=
serving
.
Server
()
server
.
set_op_sequence
(
op_seq_maker
.
get_op_sequence
())
server
.
set_op_sequence
(
op_seq_maker
.
get_op_sequence
())
server
.
set_num_threads
(
thread_num
)
server
.
set_num_threads
(
thread_num
)
server
.
set_memory_optimize
(
mem_optim
)
server
.
load_model_config
(
model
)
server
.
load_model_config
(
model
)
server
.
prepare_server
(
workdir
=
workdir
,
port
=
port
,
device
=
device
)
server
.
prepare_server
(
workdir
=
workdir
,
port
=
port
,
device
=
device
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录