Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
59580a7f
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
59580a7f
编写于
8月 14, 2018
作者:
T
tangwei12
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fix
上级
3972ba32
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
5 addition
and
8 deletion
+5
-8
paddle/fluid/operators/distributed/request_handler_impl.cc
paddle/fluid/operators/distributed/request_handler_impl.cc
+2
-2
paddle/fluid/operators/save_op.cc
paddle/fluid/operators/save_op.cc
+2
-0
python/paddle/fluid/io.py
python/paddle/fluid/io.py
+1
-6
未找到文件。
paddle/fluid/operators/distributed/request_handler_impl.cc
浏览文件 @
59580a7f
...
@@ -130,12 +130,12 @@ bool RequestCheckpointHandler::Handle(const std::string& varname,
...
@@ -130,12 +130,12 @@ bool RequestCheckpointHandler::Handle(const std::string& varname,
checkpoint_notify_id
!=
-
1
,
checkpoint_notify_id
!=
-
1
,
"when checkpoint_notify_id = -1, there should be no RPC invoke."
);
"when checkpoint_notify_id = -1, there should be no RPC invoke."
);
auto
*
lt_var
=
scope
->
FindVar
(
LOOKUP_TABLE_PATH
)
->
GetMutable
<
std
::
string
>
();
auto
*
lt_var
=
scope
_
->
FindVar
(
LOOKUP_TABLE_PATH
)
->
GetMutable
<
std
::
string
>
();
lt_var
->
clear
();
lt_var
->
clear
();
lt_var
->
append
(
out_var_name
);
lt_var
->
append
(
out_var_name
);
VLOG
(
4
)
<<
"RequestCheckpointHandler update var kLookupTablePath to: "
VLOG
(
4
)
<<
"RequestCheckpointHandler update var kLookupTablePath to: "
<<
out_var_name
;
<<
out_var_name
;
executor_
->
RunPreparedContext
(
checkpoint_prepared_ctx_
.
get
(),
scope
);
executor_
->
RunPreparedContext
(
checkpoint_prepared_ctx_
.
get
(),
scope
_
);
return
true
;
return
true
;
}
}
...
...
paddle/fluid/operators/save_op.cc
浏览文件 @
59580a7f
...
@@ -142,6 +142,8 @@ class SaveOp : public framework::OperatorBase {
...
@@ -142,6 +142,8 @@ class SaveOp : public framework::OperatorBase {
std
::
string
filename
=
lt_var
->
data
();
std
::
string
filename
=
lt_var
->
data
();
VLOG
(
4
)
<<
"SaveSelectedRows get File name: "
<<
filename
;
VLOG
(
4
)
<<
"SaveSelectedRows get File name: "
<<
filename
;
MkDirRecursively
(
DirName
(
filename
).
c_str
());
auto
&
selectedRows
=
var
->
Get
<
framework
::
SelectedRows
>
();
auto
&
selectedRows
=
var
->
Get
<
framework
::
SelectedRows
>
();
// get device context from pool
// get device context from pool
...
...
python/paddle/fluid/io.py
浏览文件 @
59580a7f
...
@@ -680,8 +680,6 @@ def load_inference_model(dirname,
...
@@ -680,8 +680,6 @@ def load_inference_model(dirname,
executor
,
executor
,
model_filename
=
None
,
model_filename
=
None
,
params_filename
=
None
,
params_filename
=
None
,
training_role
=
None
,
role_id
=
None
,
pserver_endpoints
=
None
):
pserver_endpoints
=
None
):
"""
"""
Load inference model from a directory
Load inference model from a directory
...
@@ -733,9 +731,6 @@ def load_inference_model(dirname,
...
@@ -733,9 +731,6 @@ def load_inference_model(dirname,
if
not
os
.
path
.
isdir
(
dirname
):
if
not
os
.
path
.
isdir
(
dirname
):
raise
ValueError
(
"There is no directory named '%s'"
,
dirname
)
raise
ValueError
(
"There is no directory named '%s'"
,
dirname
)
if
training_role
==
"PSERVER"
:
_load_lookup_table_vars
(
executor
,
dirname
,
program
,
role_id
)
if
model_filename
is
not
None
:
if
model_filename
is
not
None
:
model_filename
=
os
.
path
.
basename
(
model_filename
)
model_filename
=
os
.
path
.
basename
(
model_filename
)
else
:
else
:
...
@@ -800,7 +795,7 @@ def _save_lookup_tables_by_notify(executor, dirname, lookup_table,
...
@@ -800,7 +795,7 @@ def _save_lookup_tables_by_notify(executor, dirname, lookup_table,
pserver_notify_block
=
pserver_notify_program
.
global_block
()
pserver_notify_block
=
pserver_notify_program
.
global_block
()
attrs
=
{}
attrs
=
{}
attrs
[
'epmap'
]
=
pserver_endpoints
.
split
(
","
)
attrs
[
'epmap'
]
=
pserver_endpoints
attrs
[
'dir'
]
=
dirname
attrs
[
'dir'
]
=
dirname
attrs
[
'lookup_table'
]
=
lookup_table
attrs
[
'lookup_table'
]
=
lookup_table
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录