Unverified Commit d6818e0e authored by Sun Jiahao's avatar Sun Jiahao Committed by GitHub
Browse files

[Fix] Fix Auto import failed bug. (#2317)

* fix polarmix UT

* add location

* fix base_inferencer scope

* fix fail import
parent a5627bfb
...@@ -34,15 +34,22 @@ from mmengine.registry import Registry ...@@ -34,15 +34,22 @@ from mmengine.registry import Registry
# manage all kinds of runners like `EpochBasedRunner` and `IterBasedRunner` # manage all kinds of runners like `EpochBasedRunner` and `IterBasedRunner`
RUNNERS = Registry( RUNNERS = Registry(
'runner', parent=MMENGINE_RUNNERS, locations=['mmdet3d.engine.runner']) # TODO: update the location when mmdet3d has its own runner
'runner',
parent=MMENGINE_RUNNERS,
locations=['mmdet3d.engine'])
# manage runner constructors that define how to initialize runners # manage runner constructors that define how to initialize runners
RUNNER_CONSTRUCTORS = Registry( RUNNER_CONSTRUCTORS = Registry(
'runner constructor', 'runner constructor',
parent=MMENGINE_RUNNER_CONSTRUCTORS, parent=MMENGINE_RUNNER_CONSTRUCTORS,
locations=['mmdet3d.engine.runner']) # TODO: update the location when mmdet3d has its own runner
locations=['mmdet3d.engine'])
# manage all kinds of loops like `EpochBasedTrainLoop` # manage all kinds of loops like `EpochBasedTrainLoop`
LOOPS = Registry( LOOPS = Registry(
'loop', parent=MMENGINE_LOOPS, locations=['mmdet3d.engine.runner']) # TODO: update the location when mmdet3d has its own loop
'loop',
parent=MMENGINE_LOOPS,
locations=['mmdet3d.engine'])
# manage all kinds of hooks like `CheckpointHook` # manage all kinds of hooks like `CheckpointHook`
HOOKS = Registry( HOOKS = Registry(
'hook', parent=MMENGINE_HOOKS, locations=['mmdet3d.engine.hooks']) 'hook', parent=MMENGINE_HOOKS, locations=['mmdet3d.engine.hooks'])
...@@ -53,7 +60,8 @@ DATASETS = Registry( ...@@ -53,7 +60,8 @@ DATASETS = Registry(
DATA_SAMPLERS = Registry( DATA_SAMPLERS = Registry(
'data sampler', 'data sampler',
parent=MMENGINE_DATA_SAMPLERS, parent=MMENGINE_DATA_SAMPLERS,
locations=['mmdet3d.datasets.samplers']) # TODO: update the location when mmdet3d has its own data sampler
locations=['mmdet3d.datasets'])
TRANSFORMS = Registry( TRANSFORMS = Registry(
'transform', 'transform',
parent=MMENGINE_TRANSFORMS, parent=MMENGINE_TRANSFORMS,
...@@ -77,22 +85,26 @@ WEIGHT_INITIALIZERS = Registry( ...@@ -77,22 +85,26 @@ WEIGHT_INITIALIZERS = Registry(
OPTIMIZERS = Registry( OPTIMIZERS = Registry(
'optimizer', 'optimizer',
parent=MMENGINE_OPTIMIZERS, parent=MMENGINE_OPTIMIZERS,
locations=['mmdet3d.engine.optimizers']) # TODO: update the location when mmdet3d has its own optimizer
locations=['mmdet3d.engine'])
# manage optimizer wrapper # manage optimizer wrapper
OPTIM_WRAPPERS = Registry( OPTIM_WRAPPERS = Registry(
'optim wrapper', 'optim wrapper',
parent=MMENGINE_OPTIM_WRAPPERS, parent=MMENGINE_OPTIM_WRAPPERS,
locations=['mmdet3d.engine.optimizers']) # TODO: update the location when mmdet3d has its own optimizer
locations=['mmdet3d.engine'])
# manage constructors that customize the optimization hyperparameters. # manage constructors that customize the optimization hyperparameters.
OPTIM_WRAPPER_CONSTRUCTORS = Registry( OPTIM_WRAPPER_CONSTRUCTORS = Registry(
'optimizer wrapper constructor', 'optimizer wrapper constructor',
parent=MMENGINE_OPTIM_WRAPPER_CONSTRUCTORS, parent=MMENGINE_OPTIM_WRAPPER_CONSTRUCTORS,
locations=['mmdet3d.engine.optimizers']) # TODO: update the location when mmdet3d has its own optimizer
locations=['mmdet3d.engine'])
# mangage all kinds of parameter schedulers like `MultiStepLR` # mangage all kinds of parameter schedulers like `MultiStepLR`
PARAM_SCHEDULERS = Registry( PARAM_SCHEDULERS = Registry(
'parameter scheduler', 'parameter scheduler',
parent=MMENGINE_PARAM_SCHEDULERS, parent=MMENGINE_PARAM_SCHEDULERS,
locations=['mmdet3d.engine.schedulers']) # TODO: update the location when mmdet3d has its own scheduler
locations=['mmdet3d.engine'])
# manage all kinds of metrics # manage all kinds of metrics
METRICS = Registry( METRICS = Registry(
'metric', parent=MMENGINE_METRICS, locations=['mmdet3d.evaluation']) 'metric', parent=MMENGINE_METRICS, locations=['mmdet3d.evaluation'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment