提交 d14987ed 编写于 作者: T tangwei

update to fleet_rec

上级 7408da55
...@@ -41,11 +41,11 @@ train: ...@@ -41,11 +41,11 @@ train:
reader: reader:
mode: "dataset" mode: "dataset"
batch_size: 2 batch_size: 2
pipe_command: "python /paddle/eleps/models/ctr_dnn/dataset.py" pipe_command: "python /paddle/fleet_rec/models/ctr_dnn/dataset.py"
train_data_path: "/paddle/eleps/models/ctr_dnn/data/train" train_data_path: "/paddle/fleet_rec/models/ctr_dnn/data/train"
model: model:
models: "eleps.models.ctr_dnn.model" models: "fleet_rec.models.ctr_dnn.model"
hyper_parameters: hyper_parameters:
sparse_inputs_slots: 27 sparse_inputs_slots: 27
sparse_feature_number: 1000001 sparse_feature_number: 1000001
......
...@@ -35,11 +35,11 @@ train: ...@@ -35,11 +35,11 @@ train:
reader: reader:
mode: "dataset" mode: "dataset"
batch_size: 2 batch_size: 2
pipe_command: "python /paddle/eleps/models/ctr_dnn/dataset.py" pipe_command: "python /paddle/fleet_rec/models/ctr_dnn/dataset.py"
train_data_path: "/paddle/eleps/models/ctr_dnn/data/train" train_data_path: "/paddle/fleet_rec/models/ctr_dnn/data/train"
model: model:
models: "eleps.models.ctr_dnn.model" models: "fleet_rec.models.ctr_dnn.model"
hyper_parameters: hyper_parameters:
sparse_inputs_slots: 27 sparse_inputs_slots: 27
sparse_feature_number: 1000001 sparse_feature_number: 1000001
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
import os import os
from eleps.trainer.factory import TrainerFactory from fleet_rec.trainer.factory import TrainerFactory
if __name__ == "__main__": if __name__ == "__main__":
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
import math import math
import paddle.fluid as fluid import paddle.fluid as fluid
from eleps.utils import envs from fleet_rec.utils import envs
class Train(object): class Train(object):
......
...@@ -17,23 +17,20 @@ Training use fluid with one node only. ...@@ -17,23 +17,20 @@ Training use fluid with one node only.
""" """
from __future__ import print_function from __future__ import print_function
import os
import logging import logging
import paddle.fluid as fluid
from .trainer import Trainer
from ..utils import envs
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 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 ..utils import envs
from .transpiler_trainer import TranspileTrainer
logging.basicConfig(format="%(asctime)s - %(levelname)s - %(message)s") logging.basicConfig(format="%(asctime)s - %(levelname)s - %(message)s")
logger = logging.getLogger("fluid") logger = logging.getLogger("fluid")
logger.setLevel(logging.INFO) logger.setLevel(logging.INFO)
from .transpiler_trainer import TranspileTrainer
class ClusterTrainerWithDataloader(TranspileTrainer): class ClusterTrainerWithDataloader(TranspileTrainer):
pass pass
......
...@@ -23,11 +23,11 @@ import paddle.fluid as fluid ...@@ -23,11 +23,11 @@ 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 GeneralRoleMaker from paddle.fluid.incubate.fleet.base.role_maker import GeneralRoleMaker
from eleps.utils import fs as fs from fleet_rec.utils import fs as fs
from eleps.utils import util as util from fleet_rec.utils import util as util
from eleps.metrics.auc_metrics import AUCMetric from fleet_rec.metrics.auc_metrics import AUCMetric
from eleps.models import base as model_basic from fleet_rec.models import base as model_basic
from eleps.reader import dataset from fleet_rec.reader import dataset
from .trainer import Trainer from .trainer import Trainer
......
...@@ -29,16 +29,16 @@ import sys ...@@ -29,16 +29,16 @@ import sys
import yaml import yaml
from eleps.trainer.single_trainer import SingleTrainerWithDataloader from fleet_rec.trainer.single_trainer import SingleTrainerWithDataloader
from eleps.trainer.single_trainer import SingleTrainerWithDataset from fleet_rec.trainer.single_trainer import SingleTrainerWithDataset
from eleps.trainer.cluster_trainer import ClusterTrainerWithDataloader from fleet_rec.trainer.cluster_trainer import ClusterTrainerWithDataloader
from eleps.trainer.cluster_trainer import ClusterTrainerWithDataset from fleet_rec.trainer.cluster_trainer import ClusterTrainerWithDataset
from eleps.trainer.local_engine import Launch from fleet_rec.trainer.local_engine import Launch
from eleps.trainer.ctr_trainer import CtrPaddleTrainer from fleet_rec.trainer.ctr_trainer import CtrPaddleTrainer
from eleps.utils import envs from fleet_rec.utils import envs
def str2bool(v): def str2bool(v):
...@@ -103,7 +103,7 @@ class TrainerFactory(object): ...@@ -103,7 +103,7 @@ class TrainerFactory(object):
with open(config, 'r') as rb: with open(config, 'r') as rb:
_config = yaml.load(rb.read(), Loader=yaml.FullLoader) _config = yaml.load(rb.read(), Loader=yaml.FullLoader)
else: else:
raise ValueError("eleps's config only support yaml") raise ValueError("fleet_rec's config only support yaml")
envs.set_global_envs(_config) envs.set_global_envs(_config)
mode = envs.get_global_env("train.trainer") mode = envs.get_global_env("train.trainer")
......
...@@ -38,7 +38,7 @@ def start_procs(args, yaml): ...@@ -38,7 +38,7 @@ def start_procs(args, yaml):
user_endpoints_ips = [x.split(":")[0] for x in user_endpoints.split(",")] user_endpoints_ips = [x.split(":")[0] for x in user_endpoints.split(",")]
user_endpoints_port = [x.split(":")[1] for x in user_endpoints.split(",")] user_endpoints_port = [x.split(":")[1] for x in user_endpoints.split(",")]
factory = "eleps.trainer.factory" factory = "fleet_rec.trainer.factory"
cmd = [sys.executable, "-u", "-m", factory, yaml] cmd = [sys.executable, "-u", "-m", factory, yaml]
for i in range(server_num): for i in range(server_num):
......
...@@ -70,7 +70,7 @@ def pretty_print_envs(envs, header=None): ...@@ -70,7 +70,7 @@ def pretty_print_envs(envs, header=None):
if header: if header:
draws += h_format.format(header[0], header[1]) draws += h_format.format(header[0], header[1])
else: else:
draws += h_format.format("Eleps Global Envs", "Value") draws += h_format.format("fleet_rec Global Envs", "Value")
draws += line + "\n" draws += line + "\n"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册