From d2522c61c8c6a365181e86decd9ec39296d4a392 Mon Sep 17 00:00:00 2001 From: tangwei Date: Wed, 29 Apr 2020 18:01:26 +0800 Subject: [PATCH] rename --- .gitignore | 2 +- demo/ctr-dnn_train.yaml | 2 +- demo/user_define_trainer.py | 4 ++-- fleet_rec/core/engine/local_cluster_engine.py | 2 +- fleet_rec/core/engine/local_mpi_engine.py | 2 +- fleet_rec/core/factory.py | 2 +- fleet_rec/core/metrics/auc_metrics.py | 2 +- fleet_rec/core/model.py | 2 +- fleet_rec/core/modules/modul/build.py | 4 ++-- fleet_rec/core/modules/modul/layers.py | 2 +- fleet_rec/core/reader.py | 2 +- fleet_rec/core/trainer.py | 2 +- fleet_rec/core/trainers/cluster_trainer.py | 4 ++-- fleet_rec/core/trainers/ctr_coding_trainer.py | 4 ++-- fleet_rec/core/trainers/ctr_modul_trainer.py | 12 ++++++------ fleet_rec/core/trainers/single_trainer.py | 4 ++-- fleet_rec/core/trainers/transpiler_trainer.py | 6 +++--- fleet_rec/core/utils/dataloader_instance.py | 4 ++-- fleet_rec/core/utils/dataset.py | 4 ++-- fleet_rec/core/utils/dataset_instance.py | 2 +- fleet_rec/core/utils/util.py | 2 +- fleet_rec/run.py | 10 +++++----- models/rank/criteo_reader.py | 4 ++-- models/rank/dnn/model.py | 4 ++-- 24 files changed, 44 insertions(+), 44 deletions(-) diff --git a/.gitignore b/.gitignore index 4dab81fd..cca95ea7 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,6 @@ output .idea/ build/ dist/ -fleet_rec.egg-info/ +fleetrec.egg-info/ *~ *.pyc diff --git a/demo/ctr-dnn_train.yaml b/demo/ctr-dnn_train.yaml index 1303211b..70681a44 100644 --- a/demo/ctr-dnn_train.yaml +++ b/demo/ctr-dnn_train.yaml @@ -30,7 +30,7 @@ train: mode: "dataset" batch_size: 2 class: "fleetrec.models.rank.criteo_reader" - train_data_path: "fleetrec/models/rank/dnn/data/train" + train_data_path: "models/rank/dnn/data/train" model: models: "fleetrec.models.rank.dnn.model" diff --git a/demo/user_define_trainer.py b/demo/user_define_trainer.py index 4765ed36..068fd690 100644 --- a/demo/user_define_trainer.py +++ b/demo/user_define_trainer.py @@ -14,8 +14,8 @@ import paddle.fluid as fluid -from fleet_rec.core.trainers.transpiler_trainer import TranspileTrainer -from fleet_rec.core.utils import envs +from fleetrec.core.trainers.transpiler_trainer import TranspileTrainer +from fleetrec.core.utils import envs class UserDefineTrainer(TranspileTrainer): diff --git a/fleet_rec/core/engine/local_cluster_engine.py b/fleet_rec/core/engine/local_cluster_engine.py index 643cb757..e6e108d1 100644 --- a/fleet_rec/core/engine/local_cluster_engine.py +++ b/fleet_rec/core/engine/local_cluster_engine.py @@ -19,7 +19,7 @@ import sys import os import copy -from fleet_rec.core.engine.engine import Engine +from fleetrec.core.engine.engine import Engine class LocalClusterEngine(Engine): diff --git a/fleet_rec/core/engine/local_mpi_engine.py b/fleet_rec/core/engine/local_mpi_engine.py index 9d68f478..84ed6c30 100644 --- a/fleet_rec/core/engine/local_mpi_engine.py +++ b/fleet_rec/core/engine/local_mpi_engine.py @@ -19,7 +19,7 @@ import sys import os import copy -from fleet_rec.core.engine.engine import Engine +from fleetrec.core.engine.engine import Engine class LocalMPIEngine(Engine): diff --git a/fleet_rec/core/factory.py b/fleet_rec/core/factory.py index 7ecaa2dd..631bb1f6 100644 --- a/fleet_rec/core/factory.py +++ b/fleet_rec/core/factory.py @@ -17,7 +17,7 @@ import sys 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") trainers = {} diff --git a/fleet_rec/core/metrics/auc_metrics.py b/fleet_rec/core/metrics/auc_metrics.py index 46fdf594..f2f68890 100644 --- a/fleet_rec/core/metrics/auc_metrics.py +++ b/fleet_rec/core/metrics/auc_metrics.py @@ -15,7 +15,7 @@ import math import numpy as np import paddle.fluid as fluid -from fleet_rec.core.metric import Metric +from fleetrec.core.metric import Metric class AUCMetric(Metric): diff --git a/fleet_rec/core/model.py b/fleet_rec/core/model.py index dbd1e5c3..9f940b6c 100644 --- a/fleet_rec/core/model.py +++ b/fleet_rec/core/model.py @@ -1,5 +1,5 @@ import abc -from fleet_rec.core.utils import envs +from fleetrec.core.utils import envs class Model(object): """R diff --git a/fleet_rec/core/modules/modul/build.py b/fleet_rec/core/modules/modul/build.py index 7fad4471..51b83e5f 100644 --- a/fleet_rec/core/modules/modul/build.py +++ b/fleet_rec/core/modules/modul/build.py @@ -3,8 +3,8 @@ import copy import paddle.fluid as fluid from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet -from fleet_rec.core.model import Model -from fleet_rec.core.utils import table +from fleetrec.core.model import Model +from fleetrec.core.utils import table def create(config): diff --git a/fleet_rec/core/modules/modul/layers.py b/fleet_rec/core/modules/modul/layers.py index 46f1667f..84a08ee8 100644 --- a/fleet_rec/core/modules/modul/layers.py +++ b/fleet_rec/core/modules/modul/layers.py @@ -13,7 +13,7 @@ # limitations under the License. import paddle.fluid as fluid -from fleet_rec.core.layer import Layer +from fleetrec.core.layer import Layer class EmbeddingInputLayer(Layer): diff --git a/fleet_rec/core/reader.py b/fleet_rec/core/reader.py index aeba3afd..3aa96d2c 100644 --- a/fleet_rec/core/reader.py +++ b/fleet_rec/core/reader.py @@ -19,7 +19,7 @@ import os import paddle.fluid.incubate.data_generator as dg import yaml -from fleet_rec.core.utils import envs +from fleetrec.core.utils import envs class Reader(dg.MultiSlotDataGenerator): diff --git a/fleet_rec/core/trainer.py b/fleet_rec/core/trainer.py index baf0249b..06b5800e 100755 --- a/fleet_rec/core/trainer.py +++ b/fleet_rec/core/trainer.py @@ -20,7 +20,7 @@ import time import yaml from paddle import fluid -from fleet_rec.core.utils import envs +from fleetrec.core.utils import envs class Trainer(object): diff --git a/fleet_rec/core/trainers/cluster_trainer.py b/fleet_rec/core/trainers/cluster_trainer.py index 439cacfc..4a204bce 100644 --- a/fleet_rec/core/trainers/cluster_trainer.py +++ b/fleet_rec/core/trainers/cluster_trainer.py @@ -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.base.role_maker import PaddleCloudRoleMaker -from fleet_rec.core.utils import envs -from fleet_rec.core.trainers.transpiler_trainer import TranspileTrainer +from fleetrec.core.utils import envs +from fleetrec.core.trainers.transpiler_trainer import TranspileTrainer class ClusterTrainer(TranspileTrainer): diff --git a/fleet_rec/core/trainers/ctr_coding_trainer.py b/fleet_rec/core/trainers/ctr_coding_trainer.py index 6436aedc..ae6b63ce 100755 --- a/fleet_rec/core/trainers/ctr_coding_trainer.py +++ b/fleet_rec/core/trainers/ctr_coding_trainer.py @@ -18,8 +18,8 @@ import paddle.fluid as fluid from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet from paddle.fluid.incubate.fleet.base.role_maker import MPISymetricRoleMaker -from fleet_rec.core.utils import envs -from fleet_rec.core.trainer import Trainer +from fleetrec.core.utils import envs +from fleetrec.core.trainer import Trainer class CtrPaddleTrainer(Trainer): diff --git a/fleet_rec/core/trainers/ctr_modul_trainer.py b/fleet_rec/core/trainers/ctr_modul_trainer.py index 0d80a938..e72715e7 100755 --- a/fleet_rec/core/trainers/ctr_modul_trainer.py +++ b/fleet_rec/core/trainers/ctr_modul_trainer.py @@ -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 fleet_rec.core.utils import fs as fs -from fleet_rec.core.utils import util as util -from fleet_rec.core.metrics.auc_metrics import AUCMetric -from fleet_rec.core.modules.modul import build as model_basic -from fleet_rec.core.utils import dataset -from fleet_rec.core.trainer import Trainer +from fleetrec.core.utils import fs as fs +from fleetrec.core.utils import util as util +from fleetrec.core.metrics.auc_metrics import AUCMetric +from fleetrec.core.modules.modul import build as model_basic +from fleetrec.core.utils import dataset +from fleetrec.core.trainer import Trainer def wroker_numric_opt(value, env, opt): diff --git a/fleet_rec/core/trainers/single_trainer.py b/fleet_rec/core/trainers/single_trainer.py index c8eabdf9..989297a0 100644 --- a/fleet_rec/core/trainers/single_trainer.py +++ b/fleet_rec/core/trainers/single_trainer.py @@ -20,8 +20,8 @@ from __future__ import print_function import logging import paddle.fluid as fluid -from fleet_rec.core.trainers.transpiler_trainer import TranspileTrainer -from fleet_rec.core.utils import envs +from fleetrec.core.trainers.transpiler_trainer import TranspileTrainer +from fleetrec.core.utils import envs import numpy as np logging.basicConfig(format="%(asctime)s - %(levelname)s - %(message)s") diff --git a/fleet_rec/core/trainers/transpiler_trainer.py b/fleet_rec/core/trainers/transpiler_trainer.py index f93bcc69..7589286d 100644 --- a/fleet_rec/core/trainers/transpiler_trainer.py +++ b/fleet_rec/core/trainers/transpiler_trainer.py @@ -20,9 +20,9 @@ import os import paddle.fluid as fluid from paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler import fleet -from fleet_rec.core.trainer import Trainer -from fleet_rec.core.utils import envs -from fleet_rec.core.utils import dataloader_instance +from fleetrec.core.trainer import Trainer +from fleetrec.core.utils import envs +from fleetrec.core.utils import dataloader_instance class TranspileTrainer(Trainer): diff --git a/fleet_rec/core/utils/dataloader_instance.py b/fleet_rec/core/utils/dataloader_instance.py index ce876012..8c43c610 100644 --- a/fleet_rec/core/utils/dataloader_instance.py +++ b/fleet_rec/core/utils/dataloader_instance.py @@ -16,8 +16,8 @@ from __future__ import print_function import os import sys -from fleet_rec.core.utils.envs import lazy_instance -from fleet_rec.core.utils.envs import get_global_env +from fleetrec.core.utils.envs import lazy_instance +from fleetrec.core.utils.envs import get_global_env def dataloader(readerclass, train, yaml_file): diff --git a/fleet_rec/core/utils/dataset.py b/fleet_rec/core/utils/dataset.py index a979b364..92cbe891 100755 --- a/fleet_rec/core/utils/dataset.py +++ b/fleet_rec/core/utils/dataset.py @@ -18,8 +18,8 @@ import datetime import paddle.fluid as fluid -from fleet_rec.core.utils import fs as fs -from fleet_rec.core.utils import util as util +from fleetrec.core.utils import fs as fs +from fleetrec.core.utils import util as util class Dataset(object): diff --git a/fleet_rec/core/utils/dataset_instance.py b/fleet_rec/core/utils/dataset_instance.py index bb72f772..91b6af94 100644 --- a/fleet_rec/core/utils/dataset_instance.py +++ b/fleet_rec/core/utils/dataset_instance.py @@ -14,7 +14,7 @@ from __future__ import print_function import sys -from fleet_rec.core.utils.envs import lazy_instance +from fleetrec.core.utils.envs import lazy_instance if len(sys.argv) != 4: raise ValueError("reader only accept 3 argument: 1. reader_class 2.train/evaluate 3.yaml_abs_path") diff --git a/fleet_rec/core/utils/util.py b/fleet_rec/core/utils/util.py index 041793ef..b410df1d 100755 --- a/fleet_rec/core/utils/util.py +++ b/fleet_rec/core/utils/util.py @@ -17,7 +17,7 @@ import time import datetime 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): diff --git a/fleet_rec/run.py b/fleet_rec/run.py index 469750f6..a2fe2428 100644 --- a/fleet_rec/run.py +++ b/fleet_rec/run.py @@ -3,9 +3,9 @@ import os import subprocess import yaml -from fleet_rec.core.factory import TrainerFactory -from fleet_rec.core.utils import envs -from fleet_rec.core.utils import util +from fleetrec.core.factory import TrainerFactory +from fleetrec.core.utils import envs +from fleetrec.core.utils import util engines = {} device = ["CPU", "GPU"] @@ -123,7 +123,7 @@ def cluster_mpi_engine(args): def local_cluster_engine(args): 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["server_num"] = 1 @@ -148,7 +148,7 @@ def local_cluster_engine(args): def local_mpi_engine(args): 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)) diff --git a/models/rank/criteo_reader.py b/models/rank/criteo_reader.py index 88cc3b08..c4930c8d 100644 --- a/models/rank/criteo_reader.py +++ b/models/rank/criteo_reader.py @@ -13,8 +13,8 @@ # limitations under the License. from __future__ import print_function -from fleet_rec.core.reader import Reader -from fleet_rec.core.utils import envs +from fleetrec.core.reader import Reader +from fleetrec.core.utils import envs class TrainReader(Reader): diff --git a/models/rank/dnn/model.py b/models/rank/dnn/model.py index d6a1fbae..a4e6cf68 100644 --- a/models/rank/dnn/model.py +++ b/models/rank/dnn/model.py @@ -15,8 +15,8 @@ import math import paddle.fluid as fluid -from fleet_rec.core.utils import envs -from fleet_rec.core.model import Model as ModelBase +from fleetrec.core.utils import envs +from fleetrec.core.model import Model as ModelBase class Model(ModelBase): -- GitLab