提交 0bfba555 编写于 作者: T tangwei

update to fleetrec

上级 d14987ed
...@@ -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/fleet_rec/models/ctr_dnn/dataset.py" pipe_command: "python /paddle/fleetrec/models/ctr_dnn/dataset.py"
train_data_path: "/paddle/fleet_rec/models/ctr_dnn/data/train" train_data_path: "/paddle/fleetrec/models/ctr_dnn/data/train"
model: model:
models: "fleet_rec.models.ctr_dnn.model" models: "fleetrec.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/fleet_rec/models/ctr_dnn/dataset.py" pipe_command: "python /paddle/fleetrec/models/ctr_dnn/dataset.py"
train_data_path: "/paddle/fleet_rec/models/ctr_dnn/data/train" train_data_path: "/paddle/fleetrec/models/ctr_dnn/data/train"
model: model:
models: "fleet_rec.models.ctr_dnn.model" models: "fleetrec.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 fleet_rec.trainer.factory import TrainerFactory from fleetrec.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 fleet_rec.utils import envs from fleetrec.utils import envs
class Train(object): class Train(object):
......
...@@ -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 fleet_rec.utils import fs as fs from fleetrec.utils import fs as fs
from fleet_rec.utils import util as util from fleetrec.utils import util as util
from fleet_rec.metrics.auc_metrics import AUCMetric from fleetrec.metrics.auc_metrics import AUCMetric
from fleet_rec.models import base as model_basic from fleetrec.models import base as model_basic
from fleet_rec.reader import dataset from fleetrec.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 fleet_rec.trainer.single_trainer import SingleTrainerWithDataloader from fleetrec.trainer.single_trainer import SingleTrainerWithDataloader
from fleet_rec.trainer.single_trainer import SingleTrainerWithDataset from fleetrec.trainer.single_trainer import SingleTrainerWithDataset
from fleet_rec.trainer.cluster_trainer import ClusterTrainerWithDataloader from fleetrec.trainer.cluster_trainer import ClusterTrainerWithDataloader
from fleet_rec.trainer.cluster_trainer import ClusterTrainerWithDataset from fleetrec.trainer.cluster_trainer import ClusterTrainerWithDataset
from fleet_rec.trainer.local_engine import Launch from fleetrec.trainer.local_engine import Launch
from fleet_rec.trainer.ctr_trainer import CtrPaddleTrainer from fleetrec.trainer.ctr_trainer import CtrPaddleTrainer
from fleet_rec.utils import envs from fleetrec.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("fleet_rec's config only support yaml") raise ValueError("fleetrec'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 = "fleet_rec.trainer.factory" factory = "fleetrec.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("fleet_rec Global Envs", "Value") draws += h_format.format("fleetrec 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.
先完成此消息的编辑!
想要评论请 注册