mirror of
https://github.com/modelscope/FunASR
synced 2025-09-15 14:48:36 +08:00
bugfix (#1580)
* train * train * train * train * train * train * train * train * train * train * train * train * train * train * train * train * train * train * train * train * whisper_lib for sense voice * aishell recipe * sense voice * docs * bugfix
This commit is contained in:
parent
48693b45c0
commit
edb9656176
@ -19,18 +19,19 @@ def import_submodules(package, recursive=True):
|
|||||||
package = importlib.import_module(package)
|
package = importlib.import_module(package)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# 如果想要看到导入错误的具体信息,可以取消注释下面的行
|
# 如果想要看到导入错误的具体信息,可以取消注释下面的行
|
||||||
# print(f"Failed to import {name}: {e}")
|
# print(f"Failed to import {package}: {e}")
|
||||||
pass
|
pass
|
||||||
results = {}
|
results = {}
|
||||||
for loader, name, is_pkg in pkgutil.walk_packages(package.__path__, package.__name__ + '.'):
|
if not isinstance(package, str):
|
||||||
try:
|
for loader, name, is_pkg in pkgutil.walk_packages(package.__path__, package.__name__ + '.'):
|
||||||
results[name] = importlib.import_module(name)
|
try:
|
||||||
except Exception as e:
|
results[name] = importlib.import_module(name)
|
||||||
# 如果想要看到导入错误的具体信息,可以取消注释下面的行
|
except Exception as e:
|
||||||
# print(f"Failed to import {name}: {e}")
|
# 如果想要看到导入错误的具体信息,可以取消注释下面的行
|
||||||
pass
|
# print(f"Failed to import {name}: {e}")
|
||||||
if recursive and is_pkg:
|
pass
|
||||||
results.update(import_submodules(name))
|
if recursive and is_pkg:
|
||||||
|
results.update(import_submodules(name))
|
||||||
return results
|
return results
|
||||||
|
|
||||||
import_submodules(__name__)
|
import_submodules(__name__)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user