Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
335e828e
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看板
提交
335e828e
编写于
4月 30, 2020
作者:
D
Dong Daxiang
提交者:
GitHub
4月 30, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #510 from guru4elephant/refine_serving_app
add package module for paddle_serving_app
上级
ec821513
85bfb966
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
83 addition
and
4 deletion
+83
-4
python/paddle_serving_app/__init__.py
python/paddle_serving_app/__init__.py
+1
-0
python/paddle_serving_app/models/__init__.py
python/paddle_serving_app/models/__init__.py
+15
-0
python/paddle_serving_app/models/model_list.py
python/paddle_serving_app/models/model_list.py
+1
-1
python/paddle_serving_app/package.py
python/paddle_serving_app/package.py
+60
-0
python/setup.py.app.in
python/setup.py.app.in
+6
-3
未找到文件。
python/paddle_serving_app/__init__.py
浏览文件 @
335e828e
...
...
@@ -15,3 +15,4 @@ from .reader.chinese_bert_reader import ChineseBertReader
from
.reader.image_reader
import
ImageReader
from
.reader.lac_reader
import
LACReader
from
.reader.senta_reader
import
SentaReader
from
.models
import
ServingModels
python/paddle_serving_app/models/__init__.py
0 → 100644
浏览文件 @
335e828e
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from
.model_list
import
ServingModels
python/paddle_serving_app/models/model_list.py
浏览文件 @
335e828e
...
...
@@ -57,7 +57,7 @@ class ServingModels(object):
"resnet_v2_151_imagenet"
,
"resnet_v2_18_imagenet"
,
"resnet_v2_34_imagenet"
,
"
resnet_v2_50_imagenet"
,
"resnet_v2_50_imagenet"
,
"resnext101_32x16d_wsl"
,
"resnext101_32x32d_wsl"
,
"resnext101_32x48d_wsl"
,
...
...
python/paddle_serving_app/package.py
0 → 100644
浏览文件 @
335e828e
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Usage:
Download a package for serving directly
Example:
python -m paddle_serving_app.models --get_model senta_bilstm
python -m paddle_serving_app.models --list_model
"""
import
argparse
from
.models
import
ServingModels
def
parse_args
():
# pylint: disable=doc-string-missing
parser
=
argparse
.
ArgumentParser
(
"serve"
)
parser
.
add_argument
(
"--get_model"
,
type
=
str
,
default
=
""
,
help
=
"Download a specific model"
)
parser
.
add_argument
(
'--list_model'
,
nargs
=
'*'
,
default
=
None
,
help
=
"List Models"
)
return
parser
.
parse_args
()
if
__name__
==
"__main__"
:
args
=
parse_args
()
if
args
.
list_model
!=
None
:
model_handle
=
ServingModels
()
model_names
=
model_handle
.
get_model_list
()
for
key
in
model_names
:
print
(
key
)
elif
args
.
get_model
!=
""
:
model_handle
=
ServingModels
()
model_names
=
model_handle
.
get_model_list
()
if
args
.
get_model
not
in
model_names
:
print
(
"Your model name does not exist in current model list, stay tuned"
)
sys
.
exit
(
0
)
model_handle
.
download
(
args
.
get_model
)
else
:
print
(
"Wrong argument"
)
print
(
"""
Usage:
Download a package for serving directly
Example:
python -m paddle_serving_app.models --get senta_bilstm
python -m paddle_serving_app.models --list_model
"""
)
pass
python/setup.py.app.in
浏览文件 @
335e828e
...
...
@@ -48,7 +48,8 @@ REQUIRED_PACKAGES = [
packages=['paddle_serving_app',
'paddle_serving_app.reader',
'paddle_serving_app.utils',
'paddle_serving_app.reader.pddet']
'paddle_serving_app.models',
'paddle_serving_app.reader.pddet']
package_data={}
package_dir={'paddle_serving_app':
...
...
@@ -57,8 +58,10 @@ package_dir={'paddle_serving_app':
'${PADDLE_SERVING_BINARY_DIR}/python/paddle_serving_app/reader',
'paddle_serving_app.utils':
'${PADDLE_SERVING_BINARY_DIR}/python/paddle_serving_app/utils',
'paddle_serving_app.reader.pddet':
'${PADDLE_SERVING_BINARY_DIR}/python/paddle_serving_app/reader/pddet',}
'paddle_serving_app.models':
'${PADDLE_SERVING_BINARY_DIR}/python/paddle_serving_app/models',
'paddle_serving_app.reader.pddet':
'${PADDLE_SERVING_BINARY_DIR}/python/paddle_serving_app/reader/pddet',}
setup(
name='paddle-serving-app',
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录