Shortcuts

mmedit.utils.setup_env

Module Contents

Functions

register_all_modules(→ None)

Register all modules in mmedit into the registries.

try_import(→ Optional[types.ModuleType])

Try to import a module.

mmedit.utils.setup_env.register_all_modules(init_default_scope: bool = True) None[source]

Register all modules in mmedit into the registries.

Parameters

init_default_scope (bool) – Whether initialize the mmedit default scope. When init_default_scope=True, the global default scope will be set to mmedit, and all registries will build modules from mmedit’s registry node. To understand more about the registry, please refer to https://github.com/open-mmlab/mmengine/blob/main/docs/en/tutorials/registry.md Defaults to True.

mmedit.utils.setup_env.try_import(name: str) Optional[types.ModuleType][source]

Try to import a module.

Parameters

name (str) – Specifies what module to import in absolute or relative terms (e.g. either pkg.mod or ..mod).

Returns

If importing successfully, returns the imported module, otherwise returns None.

Return type

ModuleType or None

Read the Docs v: latest
Versions
master
latest
stable
zyh-re-docs
zyh-doc-notfound-extend
zyh-api-rendering
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.