Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiaopch
PaddleRec
提交
1096f044
P
PaddleRec
项目概览
xiaopch
/
PaddleRec
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleRec
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleRec
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1096f044
编写于
4月 20, 2020
作者:
T
tangwei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix readme
上级
e7986cb4
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
3 addition
and
6 deletion
+3
-6
fleetrec/core/factory.py
fleetrec/core/factory.py
+1
-2
fleetrec/core/trainers/transpiler_trainer.py
fleetrec/core/trainers/transpiler_trainer.py
+1
-1
fleetrec/examples/user_define/__init__.py
fleetrec/examples/user_define/__init__.py
+0
-0
fleetrec/examples/user_define/user_define_trainer.py
fleetrec/examples/user_define/user_define_trainer.py
+0
-0
fleetrec/examples/user_define/user_define_trainer.yaml
fleetrec/examples/user_define/user_define_trainer.yaml
+0
-0
fleetrec/run.py
fleetrec/run.py
+1
-3
未找到文件。
fleetrec/core/factory.py
浏览文件 @
1096f044
...
@@ -50,9 +50,8 @@ class TrainerFactory(object):
...
@@ -50,9 +50,8 @@ class TrainerFactory(object):
trainer_abs
=
train_mode
trainer_abs
=
train_mode
train_mode
=
"UserDefineTrainer"
train_mode
=
"UserDefineTrainer"
train_location
=
envs
.
get_global_env
(
"train.location"
)
train_dirname
=
os
.
path
.
dirname
(
trainer_abs
)
train_dirname
=
os
.
path
.
dirname
(
trainer_abs
)
base_name
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
train
_location
))[
0
]
base_name
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
train
er_abs
))[
0
]
sys
.
path
.
append
(
train_dirname
)
sys
.
path
.
append
(
train_dirname
)
trainer_class
=
envs
.
lazy_instance
(
base_name
,
train_mode
)
trainer_class
=
envs
.
lazy_instance
(
base_name
,
train_mode
)
trainer
=
trainer_class
(
yaml_path
)
trainer
=
trainer_class
(
yaml_path
)
...
...
fleetrec/core/trainers/transpiler_trainer.py
浏览文件 @
1096f044
...
@@ -44,7 +44,7 @@ class TranspileTrainer(Trainer):
...
@@ -44,7 +44,7 @@ class TranspileTrainer(Trainer):
reader_class
=
envs
.
get_global_env
(
"class"
,
None
,
namespace
)
reader_class
=
envs
.
get_global_env
(
"class"
,
None
,
namespace
)
abs_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
abs_dir
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
reader
=
os
.
path
.
join
(
abs_dir
,
'../utils'
,
'reader_instance.py'
)
reader
=
os
.
path
.
join
(
abs_dir
,
'../utils'
,
'reader_instance.py'
)
pipe_cmd
=
"python {} {} {} {}"
.
format
(
reader
,
reader_class
,
"TRAIN"
,
self
.
_config
)
pipe_cmd
=
"python {} {} {} {}"
.
format
(
reader
,
reader_class
,
"TRAIN"
,
self
.
_config
_yaml
)
train_data_path
=
envs
.
get_global_env
(
"train_data_path"
,
None
,
namespace
)
train_data_path
=
envs
.
get_global_env
(
"train_data_path"
,
None
,
namespace
)
dataset
=
fluid
.
DatasetFactory
().
create_dataset
()
dataset
=
fluid
.
DatasetFactory
().
create_dataset
()
...
...
fleetrec/examples/user_define/__init__.py
0 → 100644
浏览文件 @
1096f044
fleetrec/examples/user_define_trainer.py
→
fleetrec/examples/user_define
/user_define
_trainer.py
浏览文件 @
1096f044
文件已移动
fleetrec/examples/user_define_trainer.yaml
→
fleetrec/examples/user_define
/user_define
_trainer.yaml
浏览文件 @
1096f044
文件已移动
fleetrec/run.py
浏览文件 @
1096f044
...
@@ -40,10 +40,8 @@ def get_engine(engine):
...
@@ -40,10 +40,8 @@ def get_engine(engine):
def
single_engine
(
args
):
def
single_engine
(
args
):
print
(
"use single engine to run model: {}"
.
format
(
args
.
model
))
print
(
"use single engine to run model: {}"
.
format
(
args
.
model
))
single_envs
=
{
"trainer.trainer"
:
"SingleTrainer"
}
single_envs
=
{
"trainer.trainer"
:
"SingleTrainer"
,
"trainer.threads"
:
"2"
}
set_runtime_envs
(
single_envs
,
args
.
engine_extras
)
set_runtime_envs
(
single_envs
,
args
.
engine_extras
)
trainer
=
TrainerFactory
.
create
(
args
.
model
)
trainer
=
TrainerFactory
.
create
(
args
.
model
)
return
trainer
return
trainer
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录