Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleRec
提交
22a5088f
P
PaddleRec
项目概览
PaddlePaddle
/
PaddleRec
通知
68
Star
12
Fork
5
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
27
列表
看板
标记
里程碑
合并请求
10
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleRec
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
27
Issue
27
列表
看板
标记
里程碑
合并请求
10
合并请求
10
Pages
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
22a5088f
编写于
5月 06, 2020
作者:
C
chengmo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix
上级
a96118ec
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
18 deletion
+8
-18
fleet_rec/core/trainers/tdm_single_trainer.py
fleet_rec/core/trainers/tdm_single_trainer.py
+5
-5
fleet_rec/run.py
fleet_rec/run.py
+3
-13
未找到文件。
fleet_rec/core/trainers/tdm_single_trainer.py
浏览文件 @
22a5088f
...
...
@@ -42,15 +42,15 @@ class TDMSingleTrainer(SingleTrainer):
"single.persistables_model_path"
,
""
,
namespace
)
load_tree
=
envs
.
get_global_env
(
"
singl
e.load_tree"
,
False
,
namespace
)
"
tre
e.load_tree"
,
False
,
namespace
)
self
.
tree_layer_path
=
envs
.
get_global_env
(
"
singl
e.tree_layer_path"
,
""
,
namespace
)
"
tre
e.tree_layer_path"
,
""
,
namespace
)
self
.
tree_travel_path
=
envs
.
get_global_env
(
"
singl
e.tree_travel_path"
,
""
,
namespace
)
"
tre
e.tree_travel_path"
,
""
,
namespace
)
self
.
tree_info_path
=
envs
.
get_global_env
(
"
singl
e.tree_info_path"
,
""
,
namespace
)
"
tre
e.tree_info_path"
,
""
,
namespace
)
self
.
tree_emb_path
=
envs
.
get_global_env
(
"
singl
e.tree_emb_path"
,
""
,
namespace
)
"
tre
e.tree_emb_path"
,
""
,
namespace
)
save_init_model
=
envs
.
get_global_env
(
"single.save_init_model"
,
False
,
namespace
)
...
...
fleet_rec/run.py
浏览文件 @
22a5088f
...
...
@@ -11,6 +11,7 @@ engines = {}
device
=
[
"CPU"
,
"GPU"
]
clusters
=
[
"SINGLE"
,
"LOCAL_CLUSTER"
,
"CLUSTER"
]
custom_model
=
[
'tdm'
]
model_name
=
""
def
engine_registry
():
...
...
@@ -34,7 +35,7 @@ def get_engine(args):
d_engine
=
engines
[
device
]
transpiler
=
get_transpiler
()
engine
=
get_custom_model_engine
(
args
)
engine
=
args
.
engine
run_engine
=
d_engine
[
transpiler
].
get
(
engine
,
None
)
if
run_engine
is
None
:
...
...
@@ -43,16 +44,6 @@ def get_engine(args):
return
run_engine
def
get_custom_model_engine
(
args
):
model
=
args
.
model
model_name
=
model
.
split
(
'.'
)[
1
]
if
model_name
in
custom_model
:
engine
=
"_"
.
join
((
model_name
.
upper
(),
args
.
engine
))
else
:
engine
=
args
.
engine
return
engine
def
get_transpiler
():
FNULL
=
open
(
os
.
devnull
,
'w'
)
cmd
=
[
"python"
,
"-c"
,
...
...
@@ -93,8 +84,6 @@ def set_runtime_envs(cluster_envs, engine_yaml):
def
get_trainer_prefix
(
args
):
model
=
args
.
model
model_name
=
model
.
split
(
'.'
)[
1
]
if
model_name
in
custom_model
:
return
model_name
.
upper
()
return
""
...
...
@@ -218,6 +207,7 @@ if __name__ == "__main__":
args
=
parser
.
parse_args
()
args
.
engine
=
args
.
engine
.
upper
()
args
.
device
=
args
.
device
.
upper
()
model_name
=
args
.
model
.
split
(
'.'
)[
-
1
]
args
.
model
=
get_abs_model
(
args
.
model
)
engine_registry
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录