Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
992ca953
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看板
提交
992ca953
编写于
2月 18, 2020
作者:
M
MRXLT
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix bug && add use_local_bin
上级
ccf35cf4
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
18 addition
and
4 deletion
+18
-4
python/paddle_serving_server/__init__.py
python/paddle_serving_server/__init__.py
+9
-2
python/paddle_serving_server_gpu/__init__.py
python/paddle_serving_server_gpu/__init__.py
+9
-2
未找到文件。
python/paddle_serving_server/__init__.py
浏览文件 @
992ca953
...
...
@@ -81,11 +81,13 @@ class Server(object):
self
.
general_model_config_fn
=
"general_model.prototxt"
self
.
workdir
=
""
self
.
max_concurrency
=
0
self
.
num_threads
=
0
self
.
num_threads
=
4
self
.
port
=
8080
self
.
reload_interval_s
=
10
self
.
module_path
=
os
.
path
.
dirname
(
paddle_serving_server
.
__file__
)
self
.
cur_path
=
os
.
getcwd
()
self
.
vlog_level
=
0
self
.
use_local_bin
=
False
def
set_max_concurrency
(
self
,
concurrency
):
self
.
max_concurrency
=
concurrency
...
...
@@ -108,6 +110,10 @@ class Server(object):
def
set_memory_optimize
(
self
,
flag
=
False
):
self
.
memory_optimization
=
flag
def
set_local_bin
(
self
,
path
):
self
.
use_local_bin
=
True
self
.
bin_path
=
path
def
_prepare_engine
(
self
,
model_config_path
,
device
):
if
self
.
model_toolkit_conf
==
None
:
self
.
model_toolkit_conf
=
server_sdk
.
ModelToolkitConf
()
...
...
@@ -242,6 +248,7 @@ class Server(object):
def
run_server
(
self
):
# just run server with system command
# currently we do not load cube
if
not
self
.
use_local_bin
:
self
.
download_bin
()
command
=
"{} "
\
"-enable_model_toolkit "
\
...
...
python/paddle_serving_server_gpu/__init__.py
浏览文件 @
992ca953
...
...
@@ -81,11 +81,13 @@ class Server(object):
self
.
general_model_config_fn
=
"general_model.prototxt"
self
.
workdir
=
""
self
.
max_concurrency
=
0
self
.
num_threads
=
0
self
.
num_threads
=
4
self
.
port
=
8080
self
.
reload_interval_s
=
10
self
.
module_path
=
os
.
path
.
dirname
(
paddle_serving_server
.
__file__
)
self
.
cur_path
=
os
.
getcwd
()
self
.
vlog_level
=
0
self
.
use_local_bin
=
False
def
set_max_concurrency
(
self
,
concurrency
):
self
.
max_concurrency
=
concurrency
...
...
@@ -108,6 +110,10 @@ class Server(object):
def
set_memory_optimize
(
self
,
flag
=
False
):
self
.
memory_optimization
=
flag
def
set_local_bin
(
self
,
path
):
self
.
use_local_bin
=
True
self
.
bin_path
=
path
def
set_gpuid
(
self
,
gpuid
=
0
):
self
.
gpuid
=
gpuid
...
...
@@ -226,6 +232,7 @@ class Server(object):
def
run_server
(
self
):
# just run server with system command
# currently we do not load cube
if
not
self
.
use_local_bin
:
self
.
download_bin
()
command
=
"{} "
\
"-enable_model_toolkit "
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录