From b5ccd7febaec1811960cf42ec83940fee6a3e5c9 Mon Sep 17 00:00:00 2001 From: shenyuhan Date: Sat, 30 Nov 2019 16:49:18 +0800 Subject: [PATCH] add module_dir version --- paddlehub/module/module.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/paddlehub/module/module.py b/paddlehub/module/module.py index 06a385d3..18fcec73 100644 --- a/paddlehub/module/module.py +++ b/paddlehub/module/module.py @@ -129,7 +129,10 @@ class Module(object): self._init_with_module_file(module_dir=module_dir[0]) lock.flock(fp_lock, lock.LOCK_UN) name = module_dir[0].split("/")[-1] - version = module_dir[1] + if len(module_dir) > 1: + version = module_dir[1] + else: + version = default_module_manager.search_module(name)[1] elif signatures: if processor: if not issubclass(processor, BaseProcessor): -- GitLab