Skip to content

Commit

Permalink
[Fix]: use get instead of pop to get runner_type (open-mmlab#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
nijkah authored Sep 26, 2022
1 parent 925f183 commit 36af1f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmengine/registry/build_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def build_runner_from_cfg(cfg: Union[dict, ConfigDict, Config],
# temporarily.
scope = args.pop('_scope_', None)
with registry.switch_scope_and_registry(scope) as registry:
obj_type = args.pop('runner_type', 'mmengine.Runner')
obj_type = args.get('runner_type', 'mmengine.Runner')
if isinstance(obj_type, str):
runner_cls = registry.get(obj_type)
if runner_cls is None:
Expand Down

0 comments on commit 36af1f0

Please sign in to comment.