Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
PaddleRec
提交
d2522c61
P
PaddleRec
项目概览
BaiXuePrincess
/
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看板
提交
d2522c61
编写于
4月 29, 2020
作者:
T
tangwei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename
上级
28d374d2
变更
24
显示空白变更内容
内联
并排
Showing
24 changed file
with
44 addition
and
44 deletion
+44
-44
.gitignore
.gitignore
+1
-1
demo/ctr-dnn_train.yaml
demo/ctr-dnn_train.yaml
+1
-1
demo/user_define_trainer.py
demo/user_define_trainer.py
+2
-2
fleet_rec/core/engine/local_cluster_engine.py
fleet_rec/core/engine/local_cluster_engine.py
+1
-1
fleet_rec/core/engine/local_mpi_engine.py
fleet_rec/core/engine/local_mpi_engine.py
+1
-1
fleet_rec/core/factory.py
fleet_rec/core/factory.py
+1
-1
fleet_rec/core/metrics/auc_metrics.py
fleet_rec/core/metrics/auc_metrics.py
+1
-1
fleet_rec/core/model.py
fleet_rec/core/model.py
+1
-1
fleet_rec/core/modules/modul/build.py
fleet_rec/core/modules/modul/build.py
+2
-2
fleet_rec/core/modules/modul/layers.py
fleet_rec/core/modules/modul/layers.py
+1
-1
fleet_rec/core/reader.py
fleet_rec/core/reader.py
+1
-1
fleet_rec/core/trainer.py
fleet_rec/core/trainer.py
+1
-1
fleet_rec/core/trainers/cluster_trainer.py
fleet_rec/core/trainers/cluster_trainer.py
+2
-2
fleet_rec/core/trainers/ctr_coding_trainer.py
fleet_rec/core/trainers/ctr_coding_trainer.py
+2
-2
fleet_rec/core/trainers/ctr_modul_trainer.py
fleet_rec/core/trainers/ctr_modul_trainer.py
+6
-6
fleet_rec/core/trainers/single_trainer.py
fleet_rec/core/trainers/single_trainer.py
+2
-2
fleet_rec/core/trainers/transpiler_trainer.py
fleet_rec/core/trainers/transpiler_trainer.py
+3
-3
fleet_rec/core/utils/dataloader_instance.py
fleet_rec/core/utils/dataloader_instance.py
+2
-2
fleet_rec/core/utils/dataset.py
fleet_rec/core/utils/dataset.py
+2
-2
fleet_rec/core/utils/dataset_instance.py
fleet_rec/core/utils/dataset_instance.py
+1
-1
fleet_rec/core/utils/util.py
fleet_rec/core/utils/util.py
+1
-1
fleet_rec/run.py
fleet_rec/run.py
+5
-5
models/rank/criteo_reader.py
models/rank/criteo_reader.py
+2
-2
models/rank/dnn/model.py
models/rank/dnn/model.py
+2
-2
未找到文件。
.gitignore
浏览文件 @
d2522c61
...
@@ -3,6 +3,6 @@ output
...
@@ -3,6 +3,6 @@ output
.idea/
.idea/
build/
build/
dist/
dist/
fleet
_
rec.egg-info/
fleetrec.egg-info/
*~
*~
*.pyc
*.pyc
demo/ctr-dnn_train.yaml
浏览文件 @
d2522c61
...
@@ -30,7 +30,7 @@ train:
...
@@ -30,7 +30,7 @@ train:
mode
:
"
dataset"
mode
:
"
dataset"
batch_size
:
2
batch_size
:
2
class
:
"
fleetrec.models.rank.criteo_reader"
class
:
"
fleetrec.models.rank.criteo_reader"
train_data_path
:
"
fleetrec/
models/rank/dnn/data/train"
train_data_path
:
"
models/rank/dnn/data/train"
model
:
model
:
models
:
"
fleetrec.models.rank.dnn.model"
models
:
"
fleetrec.models.rank.dnn.model"
...
...
demo/user_define_trainer.py
浏览文件 @
d2522c61
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
fleet
_
rec.core.trainers.transpiler_trainer
import
TranspileTrainer
from
fleetrec.core.trainers.transpiler_trainer
import
TranspileTrainer
from
fleet
_
rec.core.utils
import
envs
from
fleetrec.core.utils
import
envs
class
UserDefineTrainer
(
TranspileTrainer
):
class
UserDefineTrainer
(
TranspileTrainer
):
...
...
fleet_rec/core/engine/local_cluster_engine.py
浏览文件 @
d2522c61
...
@@ -19,7 +19,7 @@ import sys
...
@@ -19,7 +19,7 @@ import sys
import
os
import
os
import
copy
import
copy
from
fleet
_
rec.core.engine.engine
import
Engine
from
fleetrec.core.engine.engine
import
Engine
class
LocalClusterEngine
(
Engine
):
class
LocalClusterEngine
(
Engine
):
...
...
fleet_rec/core/engine/local_mpi_engine.py
浏览文件 @
d2522c61
...
@@ -19,7 +19,7 @@ import sys
...
@@ -19,7 +19,7 @@ import sys
import
os
import
os
import
copy
import
copy
from
fleet
_
rec.core.engine.engine
import
Engine
from
fleetrec.core.engine.engine
import
Engine
class
LocalMPIEngine
(
Engine
):
class
LocalMPIEngine
(
Engine
):
...
...
fleet_rec/core/factory.py
浏览文件 @
d2522c61
...
@@ -17,7 +17,7 @@ import sys
...
@@ -17,7 +17,7 @@ import sys
import
yaml
import
yaml
from
fleet
_
rec.core.utils
import
envs
from
fleetrec.core.utils
import
envs
trainer_abs
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)),
"trainers"
)
trainer_abs
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)),
"trainers"
)
trainers
=
{}
trainers
=
{}
...
...
fleet_rec/core/metrics/auc_metrics.py
浏览文件 @
d2522c61
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
import
math
import
math
import
numpy
as
np
import
numpy
as
np
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
fleet
_
rec.core.metric
import
Metric
from
fleetrec.core.metric
import
Metric
class
AUCMetric
(
Metric
):
class
AUCMetric
(
Metric
):
...
...
fleet_rec/core/model.py
浏览文件 @
d2522c61
import
abc
import
abc
from
fleet
_
rec.core.utils
import
envs
from
fleetrec.core.utils
import
envs
class
Model
(
object
):
class
Model
(
object
):
"""R
"""R
...
...
fleet_rec/core/modules/modul/build.py
浏览文件 @
d2522c61
...
@@ -3,8 +3,8 @@ import copy
...
@@ -3,8 +3,8 @@ import copy
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid.incubate.fleet.parameter_server.pslib
import
fleet
from
paddle.fluid.incubate.fleet.parameter_server.pslib
import
fleet
from
fleet
_
rec.core.model
import
Model
from
fleetrec.core.model
import
Model
from
fleet
_
rec.core.utils
import
table
from
fleetrec.core.utils
import
table
def
create
(
config
):
def
create
(
config
):
...
...
fleet_rec/core/modules/modul/layers.py
浏览文件 @
d2522c61
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
# limitations under the License.
# limitations under the License.
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
fleet
_
rec.core.layer
import
Layer
from
fleetrec.core.layer
import
Layer
class
EmbeddingInputLayer
(
Layer
):
class
EmbeddingInputLayer
(
Layer
):
...
...
fleet_rec/core/reader.py
浏览文件 @
d2522c61
...
@@ -19,7 +19,7 @@ import os
...
@@ -19,7 +19,7 @@ import os
import
paddle.fluid.incubate.data_generator
as
dg
import
paddle.fluid.incubate.data_generator
as
dg
import
yaml
import
yaml
from
fleet
_
rec.core.utils
import
envs
from
fleetrec.core.utils
import
envs
class
Reader
(
dg
.
MultiSlotDataGenerator
):
class
Reader
(
dg
.
MultiSlotDataGenerator
):
...
...
fleet_rec/core/trainer.py
浏览文件 @
d2522c61
...
@@ -20,7 +20,7 @@ import time
...
@@ -20,7 +20,7 @@ import time
import
yaml
import
yaml
from
paddle
import
fluid
from
paddle
import
fluid
from
fleet
_
rec.core.utils
import
envs
from
fleetrec.core.utils
import
envs
class
Trainer
(
object
):
class
Trainer
(
object
):
...
...
fleet_rec/core/trainers/cluster_trainer.py
浏览文件 @
d2522c61
...
@@ -23,8 +23,8 @@ from paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler import f
...
@@ -23,8 +23,8 @@ from paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler import f
from
paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler.distributed_strategy
import
StrategyFactory
from
paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler.distributed_strategy
import
StrategyFactory
from
paddle.fluid.incubate.fleet.base.role_maker
import
PaddleCloudRoleMaker
from
paddle.fluid.incubate.fleet.base.role_maker
import
PaddleCloudRoleMaker
from
fleet
_
rec.core.utils
import
envs
from
fleetrec.core.utils
import
envs
from
fleet
_
rec.core.trainers.transpiler_trainer
import
TranspileTrainer
from
fleetrec.core.trainers.transpiler_trainer
import
TranspileTrainer
class
ClusterTrainer
(
TranspileTrainer
):
class
ClusterTrainer
(
TranspileTrainer
):
...
...
fleet_rec/core/trainers/ctr_coding_trainer.py
浏览文件 @
d2522c61
...
@@ -18,8 +18,8 @@ import paddle.fluid as fluid
...
@@ -18,8 +18,8 @@ import paddle.fluid as fluid
from
paddle.fluid.incubate.fleet.parameter_server.pslib
import
fleet
from
paddle.fluid.incubate.fleet.parameter_server.pslib
import
fleet
from
paddle.fluid.incubate.fleet.base.role_maker
import
MPISymetricRoleMaker
from
paddle.fluid.incubate.fleet.base.role_maker
import
MPISymetricRoleMaker
from
fleet
_
rec.core.utils
import
envs
from
fleetrec.core.utils
import
envs
from
fleet
_
rec.core.trainer
import
Trainer
from
fleetrec.core.trainer
import
Trainer
class
CtrPaddleTrainer
(
Trainer
):
class
CtrPaddleTrainer
(
Trainer
):
...
...
fleet_rec/core/trainers/ctr_modul_trainer.py
浏览文件 @
d2522c61
...
@@ -24,12 +24,12 @@ from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet
...
@@ -24,12 +24,12 @@ from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet
from
paddle.fluid.incubate.fleet.base.role_maker
import
GeneralRoleMaker
from
paddle.fluid.incubate.fleet.base.role_maker
import
GeneralRoleMaker
from
fleet
_
rec.core.utils
import
fs
as
fs
from
fleetrec.core.utils
import
fs
as
fs
from
fleet
_
rec.core.utils
import
util
as
util
from
fleetrec.core.utils
import
util
as
util
from
fleet
_
rec.core.metrics.auc_metrics
import
AUCMetric
from
fleetrec.core.metrics.auc_metrics
import
AUCMetric
from
fleet
_
rec.core.modules.modul
import
build
as
model_basic
from
fleetrec.core.modules.modul
import
build
as
model_basic
from
fleet
_
rec.core.utils
import
dataset
from
fleetrec.core.utils
import
dataset
from
fleet
_
rec.core.trainer
import
Trainer
from
fleetrec.core.trainer
import
Trainer
def
wroker_numric_opt
(
value
,
env
,
opt
):
def
wroker_numric_opt
(
value
,
env
,
opt
):
...
...
fleet_rec/core/trainers/single_trainer.py
浏览文件 @
d2522c61
...
@@ -20,8 +20,8 @@ from __future__ import print_function
...
@@ -20,8 +20,8 @@ from __future__ import print_function
import
logging
import
logging
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
fleet
_
rec.core.trainers.transpiler_trainer
import
TranspileTrainer
from
fleetrec.core.trainers.transpiler_trainer
import
TranspileTrainer
from
fleet
_
rec.core.utils
import
envs
from
fleetrec.core.utils
import
envs
import
numpy
as
np
import
numpy
as
np
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(message)s"
)
logging
.
basicConfig
(
format
=
"%(asctime)s - %(levelname)s - %(message)s"
)
...
...
fleet_rec/core/trainers/transpiler_trainer.py
浏览文件 @
d2522c61
...
@@ -20,9 +20,9 @@ import os
...
@@ -20,9 +20,9 @@ import os
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler
import
fleet
from
paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler
import
fleet
from
fleet
_
rec.core.trainer
import
Trainer
from
fleetrec.core.trainer
import
Trainer
from
fleet
_
rec.core.utils
import
envs
from
fleetrec.core.utils
import
envs
from
fleet
_
rec.core.utils
import
dataloader_instance
from
fleetrec.core.utils
import
dataloader_instance
class
TranspileTrainer
(
Trainer
):
class
TranspileTrainer
(
Trainer
):
...
...
fleet_rec/core/utils/dataloader_instance.py
浏览文件 @
d2522c61
...
@@ -16,8 +16,8 @@ from __future__ import print_function
...
@@ -16,8 +16,8 @@ from __future__ import print_function
import
os
import
os
import
sys
import
sys
from
fleet
_
rec.core.utils.envs
import
lazy_instance
from
fleetrec.core.utils.envs
import
lazy_instance
from
fleet
_
rec.core.utils.envs
import
get_global_env
from
fleetrec.core.utils.envs
import
get_global_env
def
dataloader
(
readerclass
,
train
,
yaml_file
):
def
dataloader
(
readerclass
,
train
,
yaml_file
):
...
...
fleet_rec/core/utils/dataset.py
浏览文件 @
d2522c61
...
@@ -18,8 +18,8 @@ import datetime
...
@@ -18,8 +18,8 @@ import datetime
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
fleet
_
rec.core.utils
import
fs
as
fs
from
fleetrec.core.utils
import
fs
as
fs
from
fleet
_
rec.core.utils
import
util
as
util
from
fleetrec.core.utils
import
util
as
util
class
Dataset
(
object
):
class
Dataset
(
object
):
...
...
fleet_rec/core/utils/dataset_instance.py
浏览文件 @
d2522c61
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
from
__future__
import
print_function
from
__future__
import
print_function
import
sys
import
sys
from
fleet
_
rec.core.utils.envs
import
lazy_instance
from
fleetrec.core.utils.envs
import
lazy_instance
if
len
(
sys
.
argv
)
!=
4
:
if
len
(
sys
.
argv
)
!=
4
:
raise
ValueError
(
"reader only accept 3 argument: 1. reader_class 2.train/evaluate 3.yaml_abs_path"
)
raise
ValueError
(
"reader only accept 3 argument: 1. reader_class 2.train/evaluate 3.yaml_abs_path"
)
...
...
fleet_rec/core/utils/util.py
浏览文件 @
d2522c61
...
@@ -17,7 +17,7 @@ import time
...
@@ -17,7 +17,7 @@ import time
import
datetime
import
datetime
from
paddle
import
fluid
from
paddle
import
fluid
from
fleet
_
rec.core.utils
import
fs
as
fs
from
fleetrec.core.utils
import
fs
as
fs
def
save_program_proto
(
path
,
program
=
None
):
def
save_program_proto
(
path
,
program
=
None
):
...
...
fleet_rec/run.py
浏览文件 @
d2522c61
...
@@ -3,9 +3,9 @@ import os
...
@@ -3,9 +3,9 @@ import os
import
subprocess
import
subprocess
import
yaml
import
yaml
from
fleet
_
rec.core.factory
import
TrainerFactory
from
fleetrec.core.factory
import
TrainerFactory
from
fleet
_
rec.core.utils
import
envs
from
fleetrec.core.utils
import
envs
from
fleet
_
rec.core.utils
import
util
from
fleetrec.core.utils
import
util
engines
=
{}
engines
=
{}
device
=
[
"CPU"
,
"GPU"
]
device
=
[
"CPU"
,
"GPU"
]
...
@@ -123,7 +123,7 @@ def cluster_mpi_engine(args):
...
@@ -123,7 +123,7 @@ def cluster_mpi_engine(args):
def
local_cluster_engine
(
args
):
def
local_cluster_engine
(
args
):
print
(
"launch cluster engine with cluster to run model: {}"
.
format
(
args
.
model
))
print
(
"launch cluster engine with cluster to run model: {}"
.
format
(
args
.
model
))
from
fleet
_
rec.core.engine.local_cluster_engine
import
LocalClusterEngine
from
fleetrec.core.engine.local_cluster_engine
import
LocalClusterEngine
cluster_envs
=
{}
cluster_envs
=
{}
cluster_envs
[
"server_num"
]
=
1
cluster_envs
[
"server_num"
]
=
1
...
@@ -148,7 +148,7 @@ def local_cluster_engine(args):
...
@@ -148,7 +148,7 @@ def local_cluster_engine(args):
def
local_mpi_engine
(
args
):
def
local_mpi_engine
(
args
):
print
(
"launch cluster engine with cluster to run model: {}"
.
format
(
args
.
model
))
print
(
"launch cluster engine with cluster to run model: {}"
.
format
(
args
.
model
))
from
fleet
_
rec.core.engine.local_mpi_engine
import
LocalMPIEngine
from
fleetrec.core.engine.local_mpi_engine
import
LocalMPIEngine
print
(
"use 1X1 MPI ClusterTraining at localhost to run model: {}"
.
format
(
args
.
model
))
print
(
"use 1X1 MPI ClusterTraining at localhost to run model: {}"
.
format
(
args
.
model
))
...
...
models/rank/criteo_reader.py
浏览文件 @
d2522c61
...
@@ -13,8 +13,8 @@
...
@@ -13,8 +13,8 @@
# limitations under the License.
# limitations under the License.
from
__future__
import
print_function
from
__future__
import
print_function
from
fleet
_
rec.core.reader
import
Reader
from
fleetrec.core.reader
import
Reader
from
fleet
_
rec.core.utils
import
envs
from
fleetrec.core.utils
import
envs
class
TrainReader
(
Reader
):
class
TrainReader
(
Reader
):
...
...
models/rank/dnn/model.py
浏览文件 @
d2522c61
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
import
math
import
math
import
paddle.fluid
as
fluid
import
paddle.fluid
as
fluid
from
fleet
_
rec.core.utils
import
envs
from
fleetrec.core.utils
import
envs
from
fleet
_
rec.core.model
import
Model
as
ModelBase
from
fleetrec.core.model
import
Model
as
ModelBase
class
Model
(
ModelBase
):
class
Model
(
ModelBase
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录