Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
fae303e5
S
Serving
项目概览
PaddlePaddle
/
Serving
接近 2 年 前同步成功
通知
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看板
提交
fae303e5
编写于
4月 29, 2020
作者:
D
dongdaxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refine command line arguments
上级
4b47988c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
5 addition
and
5 deletion
+5
-5
python/paddle_serving_app/package.py
python/paddle_serving_app/package.py
+5
-5
未找到文件。
python/paddle_serving_app/package.py
浏览文件 @
fae303e5
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
Usage:
Usage:
Download a package for serving directly
Download a package for serving directly
Example:
Example:
python -m paddle_serving_app.models --get senta_bilstm
python -m paddle_serving_app.models --get
_model
senta_bilstm
python -m paddle_serving_app.models --list_model
python -m paddle_serving_app.models --list_model
"""
"""
...
@@ -26,9 +26,9 @@ from .models import ServingModels
...
@@ -26,9 +26,9 @@ from .models import ServingModels
def
parse_args
():
# pylint: disable=doc-string-missing
def
parse_args
():
# pylint: disable=doc-string-missing
parser
=
argparse
.
ArgumentParser
(
"serve"
)
parser
=
argparse
.
ArgumentParser
(
"serve"
)
parser
.
add_argument
(
parser
.
add_argument
(
"--get"
,
type
=
str
,
default
=
""
,
help
=
"Download a specific model"
)
"--get
_model
"
,
type
=
str
,
default
=
""
,
help
=
"Download a specific model"
)
parser
.
add_argument
(
parser
.
add_argument
(
"--list_model"
,
type
=
bool
,
default
=
""
,
help
=
"List Models"
)
"--list_model"
,
type
=
bool
,
default
=
False
,
help
=
"List Models"
)
return
parser
.
parse_args
()
return
parser
.
parse_args
()
...
@@ -39,10 +39,10 @@ if __name__ == "__main__":
...
@@ -39,10 +39,10 @@ if __name__ == "__main__":
model_names
=
model_handle
.
get_model_list
()
model_names
=
model_handle
.
get_model_list
()
for
key
in
model_names
:
for
key
in
model_names
:
print
(
key
)
print
(
key
)
elif
args
.
get
!=
""
:
elif
args
.
get
_model
!=
""
:
model_handle
=
ServingModels
()
model_handle
=
ServingModels
()
model_names
=
model_handle
.
get_model_list
()
model_names
=
model_handle
.
get_model_list
()
if
args
.
get
not
in
model_names
:
if
args
.
get
_model
not
in
model_names
:
print
(
print
(
"Your model name does not exist in current model list, stay tuned"
"Your model name does not exist in current model list, stay tuned"
)
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录