bug fixed in plugin

Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/12261613
This commit is contained in:
zhangzhicheng.zzc
2023-04-09 23:49:23 +08:00
committed by yuze.zyz
parent 7b7e772a9f
commit 6cf4867128
2 changed files with 8 additions and 1 deletions

View File

@@ -251,6 +251,11 @@ def import_module_and_submodules(package_name: str,
continue
subpackage = f'{package_name}.{name}'
import_module_and_submodules(subpackage, exclude=exclude)
except SystemExit as e:
# this case is specific for easy_cv's tools/predict.py exit
logger.warning(
f'{package_name} not imported: {str(e)}, but should continue')
pass
except Exception as e:
logger.warning(f'{package_name} not imported: {str(e)}')
if len(package_name.split('.')) == 1:
@@ -270,6 +275,8 @@ def install_module_from_requirements(requirement_path, ):
with open(requirement_path, 'r', encoding='utf-8') as f:
requirements = f.read().splitlines()
for req in requirements:
if req == '':
continue
installed, _ = PluginsManager.check_plugin_installed(req)
if not installed:
install_list.append(req)

View File

@@ -28,7 +28,7 @@ mmcls>=0.21.0
mmdet>=2.25.0
# mmdet3d-1.0.0rc6 remove networkx and numba version restriction
mmdet3d==1.0.0a1
mmsegmentation
mmsegmentation<=0.30.0
moviepy>=1.0.3
nerfacc==0.2.2
networkx