Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Fix failed link in registry #811

Merged
merged 2 commits into from
Dec 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/en/conf.py
Expand Up @@ -51,6 +51,7 @@
] # yapf: disable
autodoc_typehints = 'description'
myst_heading_anchors = 4
myst_enable_extensions = ['colon_fence']

# Configuration for intersphinx
intersphinx_mapping = {
Expand Down
1 change: 1 addition & 0 deletions docs/zh_cn/conf.py
Expand Up @@ -56,6 +56,7 @@
] # yapf: disable
autodoc_typehints = 'description'
myst_heading_anchors = 4
myst_enable_extensions = ['colon_fence']

# Configuration for intersphinx
intersphinx_mapping = {
Expand Down
2 changes: 1 addition & 1 deletion mmengine/registry/build_functions.py
Expand Up @@ -102,7 +102,7 @@ def build_from_cfg(
f'Please check whether the value of `{obj_type}` is '
'correct or it was registered as expected. More details '
'can be found at '
'https://mmengine.readthedocs.io/en/latest/tutorials/config.html#import-custom-python-modules' # noqa: E501
'https://mmengine.readthedocs.io/en/latest/advanced_tutorials/config.html#import-the-custom-module' # noqa: E501
)
elif inspect.isclass(obj_type) or inspect.isfunction(obj_type):
obj_cls = obj_type
Expand Down
12 changes: 6 additions & 6 deletions mmengine/registry/default_scope.py
Expand Up @@ -11,12 +11,12 @@ class DefaultScope(ManagerMixin):
"""Scope of current task used to reset the current registry, which can be
accessed globally.

Consider the case of resetting the current ``Resgitry`` by``default_scope``
in the internal module which cannot access runner directly, it is difficult
to get the ``default_scope`` defined in ``Runner``. However, if ``Runner``
created ``DefaultScope`` instance by given ``default_scope``, the internal
module can get ``default_scope`` by ``DefaultScope.get_current_instance``
everywhere.
Consider the case of resetting the current ``Registry`` by
``default_scope`` in the internal module which cannot access runner
directly, it is difficult to get the ``default_scope`` defined in
``Runner``. However, if ``Runner`` created ``DefaultScope`` instance
by given ``default_scope``, the internal module can get
``default_scope`` by ``DefaultScope.get_current_instance`` everywhere.

Args:
name (str): Name of default scope for global access.
Expand Down