Skip to content

Commit 4dc4ed9

Browse files
authored
[Fix] Remove locations of not exists modules in the registry (open-mmlab#2829)
## Motivation If the module does not actually exist, setting locations will report an error. open-mmlab/mmengine#1010 ## Modification mmseg/registry/registry.py
1 parent 0e6f0e6 commit 4dc4ed9

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

mmseg/registry/registry.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Copyright (c) OpenMMLab. All rights reserved.
2-
"""MMSegmentation provides 17 registry nodes to support using modules across
2+
"""MMSegmentation provides 21 registry nodes to support using modules across
33
projects. Each node is a child of the root registry in MMEngine.
44
55
More details can be found at
6-
https://mmengine.readthedocs.io/en/latest/tutorials/registry.html.
6+
https://mmengine.readthedocs.io/en/latest/advanced_tutorials/registry.html.
77
"""
88

99
from mmengine.registry import DATA_SAMPLERS as MMENGINE_DATA_SAMPLERS
@@ -46,10 +46,7 @@
4646
# manage data-related modules
4747
DATASETS = Registry(
4848
'dataset', parent=MMENGINE_DATASETS, locations=['mmseg.datasets'])
49-
DATA_SAMPLERS = Registry(
50-
'data sampler',
51-
parent=MMENGINE_DATA_SAMPLERS,
52-
locations=['mmseg.datasets.samplers'])
49+
DATA_SAMPLERS = Registry('data sampler', parent=MMENGINE_DATA_SAMPLERS)
5350
TRANSFORMS = Registry(
5451
'transform',
5552
parent=MMENGINE_TRANSFORMS,
@@ -85,9 +82,7 @@
8582
locations=['mmseg.engine.optimizers'])
8683
# mangage all kinds of parameter schedulers like `MultiStepLR`
8784
PARAM_SCHEDULERS = Registry(
88-
'parameter scheduler',
89-
parent=MMENGINE_PARAM_SCHEDULERS,
90-
locations=['mmseg.engine.schedulers'])
85+
'parameter scheduler', parent=MMENGINE_PARAM_SCHEDULERS)
9186

9287
# manage all kinds of metrics
9388
METRICS = Registry(

0 commit comments

Comments
 (0)