提交 a01bef33 编写于 作者: T tangwei

add internal data

上级 8fb713c0
...@@ -22,7 +22,7 @@ train: ...@@ -22,7 +22,7 @@ train:
reader: reader:
batch_size: 2 batch_size: 2
class: "fleetrec.models.rank.criteo_reader" class: "fleetrec.models.rank.criteo_reader"
train_data_path: "models/rank/dnn/data/train" train_data_path: "fleetrec::models/rank/dnn/data/train"
model: model:
models: "fleetrec.models.rank.dnn.model" models: "fleetrec.models.rank.dnn.model"
......
...@@ -183,6 +183,9 @@ if __name__ == "__main__": ...@@ -183,6 +183,9 @@ if __name__ == "__main__":
raise IOError("argument model: {} do not exist".format(args.model)) raise IOError("argument model: {} do not exist".format(args.model))
engine_registry() 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) which_engine = get_engine(args.engine, args.device)
engine = which_engine(args) engine = which_engine(args)
......
...@@ -50,6 +50,8 @@ def build(dirname): ...@@ -50,6 +50,8 @@ def build(dirname):
packages = find_packages(dirname, include=('fleetrec.*')) packages = find_packages(dirname, include=('fleetrec.*'))
package_dir = {'': dirname} package_dir = {'': dirname}
package_data = {'fleetrec.models.rank.dnn': ['data/*/*.txt'], }
setup( setup(
name=about["__title__"], name=about["__title__"],
version=about["__version__"], version=about["__version__"],
...@@ -60,6 +62,7 @@ def build(dirname): ...@@ -60,6 +62,7 @@ def build(dirname):
url=about["__url__"], url=about["__url__"],
packages=packages, packages=packages,
package_dir=package_dir, package_dir=package_dir,
package_data=package_data,
python_requires=">=2.7", python_requires=">=2.7",
install_requires=requires, install_requires=requires,
zip_safe=False zip_safe=False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册