提交 28d374d2 编写于 作者: T tangwei

fix forder format

上级 2aa46612
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
import paddle.fluid as fluid import paddle.fluid as fluid
from fleetrec.core.trainers.transpiler_trainer import TranspileTrainer from fleet_rec.core.trainers.transpiler_trainer import TranspileTrainer
from fleetrec.core.utils import envs from fleet_rec.core.utils import envs
class UserDefineTrainer(TranspileTrainer): class UserDefineTrainer(TranspileTrainer):
......
...@@ -19,7 +19,7 @@ import sys ...@@ -19,7 +19,7 @@ import sys
import os import os
import copy import copy
from fleetrec.core.engine.engine import Engine from fleet_rec.core.engine.engine import Engine
class LocalClusterEngine(Engine): class LocalClusterEngine(Engine):
......
...@@ -19,7 +19,7 @@ import sys ...@@ -19,7 +19,7 @@ import sys
import os import os
import copy import copy
from fleetrec.core.engine.engine import Engine from fleet_rec.core.engine.engine import Engine
class LocalMPIEngine(Engine): class LocalMPIEngine(Engine):
......
...@@ -17,7 +17,7 @@ import sys ...@@ -17,7 +17,7 @@ import sys
import yaml import yaml
from fleetrec.core.utils import envs from fleet_rec.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 = {}
......
...@@ -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 fleetrec.core.metric import Metric from fleet_rec.core.metric import Metric
class AUCMetric(Metric): class AUCMetric(Metric):
......
import abc import abc
from fleetrec.core.utils import envs from fleet_rec.core.utils import envs
class Model(object): class Model(object):
"""R """R
......
...@@ -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 fleetrec.core.model import Model from fleet_rec.core.model import Model
from fleetrec.core.utils import table from fleet_rec.core.utils import table
def create(config): def create(config):
......
...@@ -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 fleetrec.core.layer import Layer from fleet_rec.core.layer import Layer
class EmbeddingInputLayer(Layer): class EmbeddingInputLayer(Layer):
......
...@@ -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 fleetrec.core.utils import envs from fleet_rec.core.utils import envs
class Reader(dg.MultiSlotDataGenerator): class Reader(dg.MultiSlotDataGenerator):
......
...@@ -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 fleetrec.core.utils import envs from fleet_rec.core.utils import envs
class Trainer(object): class Trainer(object):
......
...@@ -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 fleetrec.core.utils import envs from fleet_rec.core.utils import envs
from fleetrec.core.trainers.transpiler_trainer import TranspileTrainer from fleet_rec.core.trainers.transpiler_trainer import TranspileTrainer
class ClusterTrainer(TranspileTrainer): class ClusterTrainer(TranspileTrainer):
......
...@@ -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 fleetrec.core.utils import envs from fleet_rec.core.utils import envs
from fleetrec.core.trainer import Trainer from fleet_rec.core.trainer import Trainer
class CtrPaddleTrainer(Trainer): class CtrPaddleTrainer(Trainer):
......
...@@ -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 fleetrec.core.utils import fs as fs from fleet_rec.core.utils import fs as fs
from fleetrec.core.utils import util as util from fleet_rec.core.utils import util as util
from fleetrec.core.metrics.auc_metrics import AUCMetric from fleet_rec.core.metrics.auc_metrics import AUCMetric
from fleetrec.core.modules.modul import build as model_basic from fleet_rec.core.modules.modul import build as model_basic
from fleetrec.core.utils import dataset from fleet_rec.core.utils import dataset
from fleetrec.core.trainer import Trainer from fleet_rec.core.trainer import Trainer
def wroker_numric_opt(value, env, opt): def wroker_numric_opt(value, env, opt):
......
...@@ -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 fleetrec.core.trainers.transpiler_trainer import TranspileTrainer from fleet_rec.core.trainers.transpiler_trainer import TranspileTrainer
from fleetrec.core.utils import envs from fleet_rec.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")
......
...@@ -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 fleetrec.core.trainer import Trainer from fleet_rec.core.trainer import Trainer
from fleetrec.core.utils import envs from fleet_rec.core.utils import envs
from fleetrec.core.utils import dataloader_instance from fleet_rec.core.utils import dataloader_instance
class TranspileTrainer(Trainer): class TranspileTrainer(Trainer):
......
...@@ -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 fleetrec.core.utils.envs import lazy_instance from fleet_rec.core.utils.envs import lazy_instance
from fleetrec.core.utils.envs import get_global_env from fleet_rec.core.utils.envs import get_global_env
def dataloader(readerclass, train, yaml_file): def dataloader(readerclass, train, yaml_file):
......
...@@ -18,8 +18,8 @@ import datetime ...@@ -18,8 +18,8 @@ import datetime
import paddle.fluid as fluid import paddle.fluid as fluid
from fleetrec.core.utils import fs as fs from fleet_rec.core.utils import fs as fs
from fleetrec.core.utils import util as util from fleet_rec.core.utils import util as util
class Dataset(object): class Dataset(object):
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
from __future__ import print_function from __future__ import print_function
import sys import sys
from fleetrec.core.utils.envs import lazy_instance from fleet_rec.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")
......
...@@ -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 fleetrec.core.utils import fs as fs from fleet_rec.core.utils import fs as fs
def save_program_proto(path, program=None): def save_program_proto(path, program=None):
......
...@@ -3,9 +3,9 @@ import os ...@@ -3,9 +3,9 @@ import os
import subprocess import subprocess
import yaml import yaml
from fleetrec.core.factory import TrainerFactory from fleet_rec.core.factory import TrainerFactory
from fleetrec.core.utils import envs from fleet_rec.core.utils import envs
from fleetrec.core.utils import util from fleet_rec.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 fleetrec.core.engine.local_cluster_engine import LocalClusterEngine from fleet_rec.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 fleetrec.core.engine.local_mpi_engine import LocalMPIEngine from fleet_rec.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))
......
...@@ -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 fleetrec.core.reader import Reader from fleet_rec.core.reader import Reader
from fleetrec.core.utils import envs from fleet_rec.core.utils import envs
class TrainReader(Reader): class TrainReader(Reader):
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
import math import math
import paddle.fluid as fluid import paddle.fluid as fluid
from fleetrec.core.utils import envs from fleet_rec.core.utils import envs
from fleetrec.core.model import Model as ModelBase from fleet_rec.core.model import Model as ModelBase
class Model(ModelBase): class Model(ModelBase):
......
...@@ -10,13 +10,13 @@ import shutil ...@@ -10,13 +10,13 @@ import shutil
if sys.version_info.major == 2: if sys.version_info.major == 2:
requires = [ requires = [
"paddlepaddle == 1.7.2", "paddlepaddle == 1.7.2",
# "netron >= 0.0.0", # "netron >= 0.0.0",
"pyyaml >= 5.1.1" "pyyaml >= 5.1.1"
] ]
else: else:
requires = [ requires = [
"paddlepaddle >= 0.0.0", "paddlepaddle >= 0.0.0",
# "netron >= 0.0.0", # "netron >= 0.0.0",
"pyyaml >= 5.1.1" "pyyaml >= 5.1.1"
] ]
...@@ -40,12 +40,14 @@ def build(dirname): ...@@ -40,12 +40,14 @@ def build(dirname):
print(dirname) print(dirname)
package_dir = os.path.dirname(os.path.abspath(__file__)) package_dir = os.path.dirname(os.path.abspath(__file__))
run_cmd("cp -r {}/* {}".format(package_dir, dirname)) run_cmd("cp -r {}/* {}".format(package_dir, dirname))
run_cmd("mkdir {}".format(os.path.join(dirname, "fleetrec")))
run_cmd("mv {}/* {}".format(os.path.join(dirname, "fleet_rec"), os.path.join(dirname, "fleetrec")))
run_cmd("mv {} {}".format(os.path.join(dirname, "demo"), os.path.join(dirname, "fleetrec"))) run_cmd("mv {} {}".format(os.path.join(dirname, "demo"), os.path.join(dirname, "fleetrec")))
run_cmd("mv {} {}".format(os.path.join(dirname, "doc"), os.path.join(dirname, "fleetrec"))) run_cmd("mv {} {}".format(os.path.join(dirname, "doc"), os.path.join(dirname, "fleetrec")))
run_cmd("mv {} {}".format(os.path.join(dirname, "models"), os.path.join(dirname, "fleetrec"))) run_cmd("mv {} {}".format(os.path.join(dirname, "models"), os.path.join(dirname, "fleetrec")))
run_cmd("mv {} {}".format(os.path.join(dirname, "tools"), os.path.join(dirname, "fleetrec"))) run_cmd("mv {} {}".format(os.path.join(dirname, "tools"), os.path.join(dirname, "fleetrec")))
packages = find_packages(dirname) packages = find_packages(dirname, include=('fleetrec.*'))
package_dir = {'': dirname} package_dir = {'': dirname}
setup( setup(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册