Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
545df287
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2292
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
545df287
编写于
11月 27, 2020
作者:
Y
yaoxuefeng
提交者:
GitHub
11月 27, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add user_define_dump (#28596)
上级
216e0856
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
16 addition
and
4 deletion
+16
-4
paddle/fluid/framework/data_feed.cc
paddle/fluid/framework/data_feed.cc
+4
-4
paddle/fluid/framework/dist_multi_trainer.cc
paddle/fluid/framework/dist_multi_trainer.cc
+1
-0
paddle/fluid/framework/multi_trainer.cc
paddle/fluid/framework/multi_trainer.cc
+4
-0
paddle/fluid/framework/trainer.h
paddle/fluid/framework/trainer.h
+1
-0
paddle/fluid/framework/trainer_desc.proto
paddle/fluid/framework/trainer_desc.proto
+1
-0
python/paddle/fluid/incubate/fleet/parameter_server/pslib/optimizer_factory.py
...ncubate/fleet/parameter_server/pslib/optimizer_factory.py
+2
-0
python/paddle/fluid/trainer_desc.py
python/paddle/fluid/trainer_desc.py
+3
-0
未找到文件。
paddle/fluid/framework/data_feed.cc
浏览文件 @
545df287
...
...
@@ -661,7 +661,7 @@ bool MultiSlotDataFeed::ParseOneInstanceFromPipe(
"characters.
\n
please check this error line: %s,
\n
Specifically, "
"something wrong happened(the length of this slot's feasign is 0)"
"when we parse the %d th slots."
"Maybe something wrong around this slot"
,
"Maybe something wrong around this slot"
"
\n
We detect the feasign number of this slot is %d, "
"which is illegal."
,
str
,
i
,
num
));
...
...
@@ -717,7 +717,7 @@ bool MultiSlotDataFeed::ParseOneInstance(std::vector<MultiSlotType>* instance) {
"characters.
\n
please check this error line: %s,
\n
Specifically, "
"something wrong happened(the length of this slot's feasign is 0)"
"when we parse the %d th slots."
"Maybe something wrong around this slot"
,
"Maybe something wrong around this slot"
"
\n
We detect the feasign number of this slot is %d, "
"which is illegal."
,
str
,
i
,
num
));
...
...
@@ -955,7 +955,7 @@ bool MultiSlotInMemoryDataFeed::ParseOneInstanceFromPipe(Record* instance) {
"characters.
\n
please check this error line: %s,
\n
Specifically, "
"something wrong happened(the length of this slot's feasign is 0)"
"when we parse the %d th slots."
"Maybe something wrong around this slot"
,
"Maybe something wrong around this slot"
"
\n
We detect the feasign number of this slot is %d, "
"which is illegal."
,
str
,
i
,
num
));
...
...
@@ -1026,7 +1026,7 @@ bool MultiSlotInMemoryDataFeed::ParseOneInstance(Record* instance) {
"characters.
\n
please check this error line: %s,
\n
Specifically, "
"something wrong happened(the length of this slot's feasign is 0)"
"when we parse the %d th slots."
"Maybe something wrong around this slot"
,
"Maybe something wrong around this slot"
"
\n
We detect the feasign number of this slot is %d, "
"which is illegal."
,
str
,
i
,
num
));
...
...
paddle/fluid/framework/dist_multi_trainer.cc
浏览文件 @
545df287
...
...
@@ -33,6 +33,7 @@ void DistMultiTrainer::Initialize(const TrainerDesc &trainer_desc,
mpi_rank_
=
trainer_desc
.
mpi_rank
();
mpi_size_
=
trainer_desc
.
mpi_size
();
dump_file_num_
=
trainer_desc
.
dump_file_num
();
user_define_dump_filename_
=
trainer_desc
.
user_define_dump_filename
();
const
std
::
vector
<
paddle
::
framework
::
DataFeed
*>
readers
=
dataset
->
GetReaders
();
RegisterHeterCallback
();
...
...
paddle/fluid/framework/multi_trainer.cc
浏览文件 @
545df287
...
...
@@ -71,6 +71,10 @@ void MultiTrainer::Initialize(const TrainerDesc& trainer_desc,
}
std
::
string
MultiTrainer
::
GetDumpPath
(
int
tid
)
{
if
(
user_define_dump_filename_
!=
""
)
{
return
string
::
format_string
(
"%s/part-%s-%05d"
,
dump_fields_path_
.
c_str
(),
user_define_dump_filename_
.
c_str
(),
tid
);
}
return
string
::
format_string
(
"%s/part-%03d-%05d"
,
dump_fields_path_
.
c_str
(),
mpi_rank_
,
tid
);
}
...
...
paddle/fluid/framework/trainer.h
浏览文件 @
545df287
...
...
@@ -79,6 +79,7 @@ class TrainerBase {
// For dump param or field
bool
need_dump_field_
=
false
;
std
::
string
user_define_dump_filename_
;
bool
need_dump_param_
=
false
;
std
::
string
dump_fields_path_
;
std
::
string
dump_converter_
;
...
...
paddle/fluid/framework/trainer_desc.proto
浏览文件 @
545df287
...
...
@@ -60,6 +60,7 @@ message TrainerDesc {
optional
int32
xpu_end_idx
=
31
;
optional
bool
use_ps_gpu
=
32
[
default
=
false
];
optional
string
user_define_dump_filename
=
33
;
// device worker parameters
optional
HogwildWorkerParameter
hogwild_param
=
101
;
...
...
python/paddle/fluid/incubate/fleet/parameter_server/pslib/optimizer_factory.py
浏览文件 @
545df287
...
...
@@ -760,6 +760,8 @@ class DistributedAdam(DistributedOptimizerImplBase):
opt_info
[
"dump_converter"
]
=
""
opt_info
[
"dump_fields"
]
=
strategy
.
get
(
"dump_fields"
,
[])
opt_info
[
"dump_file_num"
]
=
strategy
.
get
(
"dump_file_num"
,
16
)
opt_info
[
"user_define_dump_filename"
]
=
strategy
.
get
(
"user_define_dump_filename"
,
""
)
opt_info
[
"dump_fields_path"
]
=
strategy
.
get
(
"dump_fields_path"
,
""
)
opt_info
[
"dump_param"
]
=
strategy
.
get
(
"dump_param"
,
[])
opt_info
[
"worker_places"
]
=
strategy
.
get
(
"worker_places"
,
[])
...
...
python/paddle/fluid/trainer_desc.py
浏览文件 @
545df287
...
...
@@ -146,6 +146,9 @@ class TrainerDesc(object):
def
_set_dump_file_num
(
self
,
dump_file_num
):
self
.
proto_desc
.
dump_file_num
=
dump_file_num
def
_set_user_define_dump_filename
(
self
,
user_define_dump_filename
):
self
.
proto_desc
.
user_define_dump_filename
=
user_define_dump_filename
def
_set_dump_converter
(
self
,
converter
):
self
.
proto_desc
.
dump_converter
=
converter
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录