Skip to content

Commit

Permalink
fix typo (open-mmlab#955)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouzaida authored Feb 23, 2023
1 parent fc9518e commit d8abf9a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions mmengine/registry/build_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def build_from_cfg(
def build_runner_from_cfg(cfg: Union[dict, ConfigDict, Config],
registry: Registry) -> 'Runner':
"""Build a Runner object.
Examples:
>>> from mmengine.registry import Registry, build_runner_from_cfg
>>> RUNNERS = Registry('runners', build_func=build_runner_from_cfg)
Expand Down
2 changes: 1 addition & 1 deletion mmengine/registry/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def get(self, key: str) -> Optional[Type]:
>>> # hierarchical registry
>>> DETECTORS = Registry('detector', parent=MODELS, scope='det')
>>> # `ResNet` does not exist in `DETECTORS` but `get` method
>>> # will try to search from its parenet or ancestors
>>> # will try to search from its parents or ancestors
>>> resnet_cls = DETECTORS.get('ResNet')
>>> CLASSIFIER = Registry('classifier', parent=MODELS, scope='cls')
>>> @CLASSIFIER.register_module()
Expand Down
2 changes: 1 addition & 1 deletion mmengine/runner/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ def build_optim_wrapper(
else:
# if `optimizer` is not defined, it should be the case of
# training with multiple optimizers. If `constructor` is not
# defined either, Each value of `optim_wrapper` must be an
# defined either, each value of `optim_wrapper` must be an
# `OptimWrapper` instance since `DefaultOptimizerConstructor`
# will not handle the case of training with multiple
# optimizers. `build_optim_wrapper` will directly build the
Expand Down

0 comments on commit d8abf9a

Please sign in to comment.