MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / check_module_exists

Function check_module_exists

imperative/python/megengine/hub/tools.py:22–28  ·  view source on GitHub ↗

r"""Checks whether python module exists or not. Args: module: name of module.

(module: str)

Source from the content-addressed store, hash-verified

20
21
22def check_module_exists(module: str) -> bool:
23 r"""Checks whether python module exists or not.
24
25 Args:
26 module: name of module.
27 """
28 return importlib.util.find_spec(module) is not None
29
30
31@contextmanager

Callers 1

_check_dependenciesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected