未验证 提交 10d13c43 编写于 作者: K Kaipeng Deng 提交者: GitHub

fix setup.py (#2457)

上级 cfbba55c
...@@ -32,7 +32,6 @@ def parse_requirements(fname): ...@@ -32,7 +32,6 @@ def parse_requirements(fname):
def package_model_zoo(): def package_model_zoo():
from ppdet.model_zoo import MODEL_ZOO_FILENAME
cur_dir = osp.dirname(osp.realpath(__file__)) cur_dir = osp.dirname(osp.realpath(__file__))
cfg_dir = osp.join(cur_dir, "configs") cfg_dir = osp.join(cur_dir, "configs")
cfgs = glob.glob(osp.join(cfg_dir, '*/*.yml')) cfgs = glob.glob(osp.join(cfg_dir, '*/*.yml'))
...@@ -44,7 +43,7 @@ def package_model_zoo(): ...@@ -44,7 +43,7 @@ def package_model_zoo():
valid_cfgs.append(cfg) valid_cfgs.append(cfg)
model_names = [osp.splitext(osp.split(cfg)[1])[0] for cfg in valid_cfgs] model_names = [osp.splitext(osp.split(cfg)[1])[0] for cfg in valid_cfgs]
model_zoo_file = osp.join(cur_dir, 'ppdet', 'model_zoo', MODEL_ZOO_FILENAME) model_zoo_file = osp.join(cur_dir, 'ppdet', 'model_zoo', 'MODEL_ZOO')
with open(model_zoo_file, 'w') as wf: with open(model_zoo_file, 'w') as wf:
for model_name in model_names: for model_name in model_names:
wf.write("{}\n".format(model_name)) wf.write("{}\n".format(model_name))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册