From dc39d6d4c12286f96e4e899ae1131546e3764bb2 Mon Sep 17 00:00:00 2001 From: HAOCHENYE <21724054@zju.edu.cn> Date: Wed, 11 Sep 2024 10:44:09 +0000 Subject: [PATCH] fix check builtin module --- mmengine/config/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mmengine/config/utils.py b/mmengine/config/utils.py index 36f07466b2..9e9f990885 100644 --- a/mmengine/config/utils.py +++ b/mmengine/config/utils.py @@ -176,7 +176,8 @@ def _is_builtin_module(module_name: str) -> bool: return False origin_path = osp.abspath(origin_path) if ('site-package' in origin_path or 'dist-package' in origin_path - or not origin_path.startswith(PYTHON_ROOT_DIR)): + or not origin_path.startswith( + (PYTHON_ROOT_DIR, '/usr/lib/python'))): return False else: return True