diff --git a/demo/ctr-dnn_train.yaml b/demo/ctr-dnn_train.yaml index 8fd0c3f66c79122be1260dae5bf9a275727f398a..0f49138c0825a3f82db3779b678347f94db3a7db 100644 --- a/demo/ctr-dnn_train.yaml +++ b/demo/ctr-dnn_train.yaml @@ -22,7 +22,7 @@ train: reader: batch_size: 2 class: "fleetrec.models.rank.criteo_reader" - train_data_path: "models/rank/dnn/data/train" + train_data_path: "fleetrec::models/rank/dnn/data/train" model: models: "fleetrec.models.rank.dnn.model" diff --git a/fleet_rec/run.py b/fleet_rec/run.py index a2fe242871b2c7f2ec2e107c4bf8e51c1598c19c..bed88bae1ec80234adf2fdae6d9c5f7a3cf25292 100644 --- a/fleet_rec/run.py +++ b/fleet_rec/run.py @@ -183,6 +183,9 @@ if __name__ == "__main__": raise IOError("argument model: {} do not exist".format(args.model)) engine_registry() + abs_dir = os.path.dirname(os.path.abspath(__file__)) + envs.set_runtime_environs({"PACKAGE_BASE": abs_dir}) + which_engine = get_engine(args.engine, args.device) engine = which_engine(args) diff --git a/setup.py b/setup.py index 151154445ceee635ad88cd92fd1b70afb866f00a..84091b676a8e3ca288fc12772b98ad972bbe94aa 100644 --- a/setup.py +++ b/setup.py @@ -50,6 +50,8 @@ def build(dirname): packages = find_packages(dirname, include=('fleetrec.*')) package_dir = {'': dirname} + package_data = {'fleetrec.models.rank.dnn': ['data/*/*.txt'], } + setup( name=about["__title__"], version=about["__version__"], @@ -60,6 +62,7 @@ def build(dirname): url=about["__url__"], packages=packages, package_dir=package_dir, + package_data=package_data, python_requires=">=2.7", install_requires=requires, zip_safe=False