Skip to content

Commit

Permalink
fix warnings when falling back to mmengine registry (open-mmlab#2082)
Browse files Browse the repository at this point in the history
  • Loading branch information
ly015 authored Mar 17, 2023
1 parent 16deea0 commit 63e9eff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions mmpose/engine/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Copyright (c) OpenMMLab. All rights reserved.
from .hooks import * # noqa: F401, F403
from .optim_wrappers import * # noqa: F401, F403
10 changes: 4 additions & 6 deletions mmpose/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,24 +76,22 @@
# Registries For Optimizer and the related
# manage all kinds of optimizers like `SGD` and `Adam`
OPTIMIZERS = Registry(
'optimizer',
parent=MMENGINE_OPTIMIZERS,
locations=['mmpose.engine.optimizers'])
'optimizer', parent=MMENGINE_OPTIMIZERS, locations=['mmpose.engine'])
# manage optimizer wrapper
OPTIM_WRAPPERS = Registry(
'optimizer_wrapper',
parent=MMENGINE_OPTIM_WRAPPERS,
locations=['mmpose.engine.optimizers'])
locations=['mmpose.engine'])
# manage constructors that customize the optimization hyperparameters.
OPTIM_WRAPPER_CONSTRUCTORS = Registry(
'optimizer wrapper constructor',
parent=MMENGINE_OPTIM_WRAPPER_CONSTRUCTORS,
locations=['mmpose.engine.optimizers'])
locations=['mmpose.engine.optim_wrappers'])
# manage all kinds of parameter schedulers like `MultiStepLR`
PARAM_SCHEDULERS = Registry(
'parameter scheduler',
parent=MMENGINE_PARAM_SCHEDULERS,
locations=['mmpose.engine.schedulers'])
locations=['mmpose.engine'])

# manage all kinds of metrics
METRICS = Registry(
Expand Down

0 comments on commit 63e9eff

Please # to comment.