open-mmlab / mmcv

OpenMMLab Computer Vision Foundation
https://mmcv.readthedocs.io/en/latest/
Apache License 2.0
5.91k stars 1.65k forks source link

KeyError: 'CosineAnnealingLrUpdaterHook is not in the hook registry' #3011

Open kevinyang03 opened 10 months ago

kevinyang03 commented 10 months ago

Prerequisite

Environment

cuda10.0 pytorch1.4.0 mmcv0.5.9

Reproduces the problem - code sample

_non_dist_train(model, dataset, cfg, validate=validate)  # mmt

File "/root/autodl-fs/cancer_detect_1220/TianChi/mmdetection/mmdet/apis/train.py", line 277, in _non_dist_train cfg.checkpoint_config, cfg.log_config) File "/root/miniconda3/envs/mmyb/lib/python3.7/site-packages/mmcv/runner/runner.py", line 471, in register_training_hooks self.register_lr_hook(lr_config) File "/root/miniconda3/envs/mmyb/lib/python3.7/site-packages/mmcv/runner/runner.py", line 402, in register_lr_hook hook = mmcv.build_from_cfg(lr_config, HOOKS) File "/root/miniconda3/envs/mmyb/lib/python3.7/site-packages/mmcv/utils/registry.py", line 158, in build_from_cfg f'{obj_type} is not in the {registry.name} registry') KeyError: 'CosineAnnealingLrUpdaterHook is not in the hook registry'

Reproduces the problem - command or script

_non_dist_train(model, dataset, cfg, validate=validate)  # mmt

File "/root/autodl-fs/cancer_detect_1220/TianChi/mmdetection/mmdet/apis/train.py", line 277, in _non_dist_train cfg.checkpoint_config, cfg.log_config) File "/root/miniconda3/envs/mmyb/lib/python3.7/site-packages/mmcv/runner/runner.py", line 471, in register_training_hooks self.register_lr_hook(lr_config) File "/root/miniconda3/envs/mmyb/lib/python3.7/site-packages/mmcv/runner/runner.py", line 402, in register_lr_hook hook = mmcv.build_from_cfg(lr_config, HOOKS) File "/root/miniconda3/envs/mmyb/lib/python3.7/site-packages/mmcv/utils/registry.py", line 158, in build_from_cfg f'{obj_type} is not in the {registry.name} registry') KeyError: 'CosineAnnealingLrUpdaterHook is not in the hook registry'

Reproduces the problem - error message

_non_dist_train(model, dataset, cfg, validate=validate)  # mmt

File "/root/autodl-fs/cancer_detect_1220/TianChi/mmdetection/mmdet/apis/train.py", line 277, in _non_dist_train cfg.checkpoint_config, cfg.log_config) File "/root/miniconda3/envs/mmyb/lib/python3.7/site-packages/mmcv/runner/runner.py", line 471, in register_training_hooks self.register_lr_hook(lr_config) File "/root/miniconda3/envs/mmyb/lib/python3.7/site-packages/mmcv/runner/runner.py", line 402, in register_lr_hook hook = mmcv.build_from_cfg(lr_config, HOOKS) File "/root/miniconda3/envs/mmyb/lib/python3.7/site-packages/mmcv/utils/registry.py", line 158, in build_from_cfg f'{obj_type} is not in the {registry.name} registry') KeyError: 'CosineAnnealingLrUpdaterHook is not in the hook registry'

Additional information

No response

kevinyang03 commented 10 months ago

help

zhouzaida commented 10 months ago

Hi, what is your mmdet version?

kevinyang03 commented 10 months ago

hi,my mmdet version is 1.0rc1+unknown.This environment configuration can run normally on the old server, but this error occurred after switching to a new server.

zhouzaida commented 10 months ago

What is your mmcv version? BTW, the version of mmdet is too old.