open-mmlab / mmaction2

OpenMMLab's Next Generation Video Understanding Toolbox and Benchmark

Home Page:https://mmaction2.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] 'ActionVisualizer is not in the mmengine::visualizer registry.

jy0x4f opened this issue · comments

commented

Branch

main branch (1.x version, such as v1.0.0, or dev-1.x branch)

Prerequisite

Environment

mmcls 0.25.0
mmcv 2.0.1
mmengine 0.10.1
opencv-contrib-python 4.8.1.78
opencv-python 4.8.1.78
python 3.10.13
pytorch 1.12.0 py3.10_cuda11.3_cudnn8.3.2_0 pytorch
torchaudio 0.12.0
torchvision 0.13.0
tqdm 4.65.2

Describe the bug

我在自己3060电脑上跑着代码是没有问题的,能够出结果,但是将代码放到3090服务器上,并且配置了和本地一样的环境,提示 'ActionVisualizer is not in the mmengine::visualizer registry.我尝试很多不同版本的mmcv,mmengine等都不能解决

Reproduces the problem - code sample

No response

Reproduces the problem - command or script

CUDA_VISIBLE_DEVICES=6 nohup python tools/train.py configs/recognition/resnet_code.py >> output.out 2>&1 &

Reproduces the problem - error message

12/14 21:31:06 - mmengine - INFO -

System environment:
sys.platform: linux
Python: 3.10.13 (main, Sep 11 2023, 13:44:35) [GCC 11.2.0]
CUDA available: True
numpy_random_seed: 1187698724
GPU 0: NVIDIA GeForce RTX 3090
CUDA_HOME: /usr/local/cuda
NVCC: Cuda compilation tools, release 11.3, V11.3.58
GCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
PyTorch: 1.12.0
PyTorch compiling details: PyTorch built with:

  • GCC 9.3

  • C++ Version: 201402

  • Intel(R) oneAPI Math Kernel Library Version 2023.1-Product Build 20230303 for Intel(R) 64 architecture applications

  • Intel(R) MKL-DNN v2.6.0 (Git Hash 52b5f107dd9cf10910aaa19cb47f3abf9b349815)

  • OpenMP 201511 (a.k.a. OpenMP 4.5)

  • LAPACK is enabled (usually provided by MKL)

  • NNPACK is enabled

  • CPU capability usage: AVX2

  • CUDA Runtime 11.3

  • NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_37,code=compute_37

  • CuDNN 8.3.2 (built against CUDA 11.5)

  • Magma 2.5.2

  • Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.3, CUDNN_VERSION=8.3.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.12.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=OFF, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF,

    TorchVision: 0.13.0
    OpenCV: 4.8.1
    MMEngine: 0.10.1

Runtime environment:
cudnn_benchmark: False
mp_cfg: {'mp_start_method': 'fork', 'opencv_num_threads': 0}
dist_cfg: {'backend': 'nccl'}
seed: 1187698724
diff_rank_seed: False
deterministic: False
Distributed launcher: none
Distributed training: False
GPU number: 1

12/14 21:31:07 - mmengine - INFO - Config:
ann_file_test = '/media/amax/c08a625b-023d-436f-b33e-9652dc1bc7c0/DATA/dataset/Poker_Event/Poker_list/test_label.txt'
ann_file_train = '/media/amax/c08a625b-023d-436f-b33e-9652dc1bc7c0/DATA/dataset/Poker_Event/Poker_list/train_label.txt'
ann_file_val = '/media/amax/c08a625b-023d-436f-b33e-9652dc1bc7c0/DATA/dataset/Poker_Event/Poker_list/test_label.txt'
auto_scale_lr = dict(base_batch_size=128, enable=False)
batch_size = 2
data_root = '/media/amax/c08a625b-023d-436f-b33e-9652dc1bc7c0/DATA/dataset/Poker_Event/Poker_rgb_event/'
data_root_val = '/media/amax/c08a625b-023d-436f-b33e-9652dc1bc7c0/DATA/dataset/Poker_Event/Poker_rgb_event/'
dataset_type = 'RawframeDataset'
default_hooks = dict(
checkpoint=dict(
interval=3, max_keep_ckpts=1, save_best='auto', type='CheckpointHook'),
logger=dict(ignore_last=False, interval=500, type='LoggerHook'),
param_scheduler=dict(type='ParamSchedulerHook'),
runtime_info=dict(type='RuntimeInfoHook'),
sampler_seed=dict(type='DistSamplerSeedHook'),
sync_buffers=dict(type='SyncBuffersHook'),
timer=dict(type='IterTimerHook'))
default_scope = 'mmengine'
env_cfg = dict(
cudnn_benchmark=False,
dist_cfg=dict(backend='nccl'),
mp_cfg=dict(mp_start_method='fork', opencv_num_threads=0))
file_client_args = dict(io_backend='disk')
launcher = 'none'
load_from = None
log_level = 'INFO'
log_processor = dict(by_epoch=True, type='LogProcessor', window_size=20)
model = dict(
backbone=dict(depth=50, type='ResNetELP'),
cls_head=dict(in_channels=2048, num_classes=5, type='MutilModelHead'),
type='Recognizer2D')
num_workers = 4
optim_wrapper = dict(
clip_grad=dict(max_norm=20, norm_type=2),
constructor='TSMOptimWrapperConstructor',
optimizer=dict(lr=0.001, momentum=0.9, type='SGD', weight_decay=0.0001),
paramwise_cfg=dict(fc_lr5=True))
param_scheduler = [
dict(
begin=0,
by_epoch=True,
end=30,
gamma=0.1,
milestones=[
25,
30,
],
type='MultiStepLR'),
]
randomness = dict(deterministic=False, diff_rank_seed=False, seed=None)
resume = False
test_cfg = dict(type='TestLoop')
test_dataloader = dict(
batch_size=2,
dataset=dict(
ann_file=
'/media/amax/c08a625b-023d-436f-b33e-9652dc1bc7c0/DATA/dataset/Poker_Event/Poker_list/test_label.txt',
data_prefix=dict(
img=
'/media/amax/c08a625b-023d-436f-b33e-9652dc1bc7c0/DATA/dataset/Poker_Event/Poker_rgb_event/'
),
pipeline=[
dict(
clip_len=1,
frame_interval=1,
num_clips=8,
test_mode=True,
type='SampleFrames'),
dict(type='RawFrameDecode'),
dict(scale=(
-1,
256,
), type='Resize'),
dict(crop_size=224, type='CenterCrop'),
dict(input_format='NCHW', type='FormatShape'),
dict(type='PackActionInputs'),
],
test_mode=True,
type='RawframeDataset'),
num_workers=4,
persistent_workers=True,
sampler=dict(shuffle=True, type='DefaultSampler'))
test_evaluator = dict(type='AccMetric')
test_pipeline = [
dict(
clip_len=1,
frame_interval=1,
num_clips=8,
test_mode=True,
type='SampleFrames'),
dict(type='RawFrameDecode'),
dict(scale=(
-1,
256,
), type='Resize'),
dict(crop_size=224, type='CenterCrop'),
dict(input_format='NCHW', type='FormatShape'),
dict(type='PackActionInputs'),
]
train_cfg = dict(
max_epochs=100, type='EpochBasedTrainLoop', val_begin=1, val_interval=1)
train_dataloader = dict(
batch_size=2,
dataset=dict(
ann_file=
'/media/amax/c08a625b-023d-436f-b33e-9652dc1bc7c0/DATA/dataset/Poker_Event/Poker_list/train_label.txt',
data_prefix=dict(
img=
'/media/amax/c08a625b-023d-436f-b33e-9652dc1bc7c0/DATA/dataset/Poker_Event/Poker_rgb_event/'
),
pipeline=[
dict(
clip_len=1, frame_interval=1, num_clips=8,
type='SampleFrames'),
dict(type='RawFrameDecode'),
dict(scale=(
-1,
256,
), type='Resize'),
dict(
input_size=224,
max_wh_scale_gap=1,
num_fixed_crops=13,
random_crop=False,
scales=(
1,
0.875,
0.75,
0.66,
),
type='MultiScaleCrop'),
dict(keep_ratio=False, scale=(
224,
224,
), type='Resize'),
dict(flip_ratio=0.5, type='Flip'),
dict(input_format='NCHW', type='FormatShape'),
dict(type='PackActionInputs'),
],
type='RawframeDataset'),
num_workers=4,
persistent_workers=True,
sampler=dict(shuffle=True, type='DefaultSampler'))
train_pipeline = [
dict(clip_len=1, frame_interval=1, num_clips=8, type='SampleFrames'),
dict(type='RawFrameDecode'),
dict(scale=(
-1,
256,
), type='Resize'),
dict(
input_size=224,
max_wh_scale_gap=1,
num_fixed_crops=13,
random_crop=False,
scales=(
1,
0.875,
0.75,
0.66,
),
type='MultiScaleCrop'),
dict(keep_ratio=False, scale=(
224,
224,
), type='Resize'),
dict(flip_ratio=0.5, type='Flip'),
dict(input_format='NCHW', type='FormatShape'),
dict(type='PackActionInputs'),
]
val_cfg = dict(type='ValLoop')
val_dataloader = dict(
batch_size=2,
dataset=dict(
ann_file=
'/media/amax/c08a625b-023d-436f-b33e-9652dc1bc7c0/DATA/dataset/Poker_Event/Poker_list/test_label.txt',
data_prefix=dict(
img=
'/media/amax/c08a625b-023d-436f-b33e-9652dc1bc7c0/DATA/dataset/Poker_Event/Poker_rgb_event/'
),
pipeline=[
dict(
clip_len=1,
frame_interval=1,
num_clips=8,
test_mode=True,
type='SampleFrames'),
dict(type='RawFrameDecode'),
dict(scale=(
-1,
256,
), type='Resize'),
dict(crop_size=224, type='CenterCrop'),
dict(input_format='NCHW', type='FormatShape'),
dict(type='PackActionInputs'),
],
test_mode=True,
type='RawframeDataset'),
num_workers=4,
persistent_workers=True,
sampler=dict(shuffle=True, type='DefaultSampler'))
val_evaluator = dict(type='AccMetric')
val_pipeline = [
dict(
clip_len=1,
frame_interval=1,
num_clips=8,
test_mode=True,
type='SampleFrames'),
dict(type='RawFrameDecode'),
dict(scale=(
-1,
256,
), type='Resize'),
dict(crop_size=224, type='CenterCrop'),
dict(input_format='NCHW', type='FormatShape'),
dict(type='PackActionInputs'),
]
vis_backends = [
dict(type='LocalVisBackend'),
]
visualizer = dict(
type='ActionVisualizer', vis_backends=[
dict(type='LocalVisBackend'),
])
work_dir = './work_dirs/resnet_code'

Traceback (most recent call last):
File "/media/amax/c08a625b-023d-436f-b33e-9652dc1bc7c0/DATA/jinyu/TSM_Former-main/tools/train.py", line 136, in
main()
File "/media/amax/c08a625b-023d-436f-b33e-9652dc1bc7c0/DATA/jinyu/TSM_Former-main/tools/train.py", line 128, in main
runner = Runner.from_cfg(cfg)
File "/home/jiny/.conda/envs/mmaction/lib/python3.10/site-packages/mmengine/runner/runner.py", line 462, in from_cfg
runner = cls(
File "/home/jiny/.conda/envs/mmaction/lib/python3.10/site-packages/mmengine/runner/runner.py", line 416, in init
self.visualizer = self.build_visualizer(visualizer)
File "/home/jiny/.conda/envs/mmaction/lib/python3.10/site-packages/mmengine/runner/runner.py", line 803, in build_visualizer
return VISUALIZERS.build(visualizer)
File "/home/jiny/.conda/envs/mmaction/lib/python3.10/site-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/home/jiny/.conda/envs/mmaction/lib/python3.10/site-packages/mmengine/registry/build_functions.py", line 100, in build_from_cfg
raise KeyError(
KeyError: 'ActionVisualizer is not in the mmengine::visualizer registry. Please check whether the value of ActionVisualizer is correct or it was registered as expected. More details can be found at https://mmengine.readthedocs.io/en/latest/advanced_tutorials/config.html#import-the-custom-module'

Additional information

No response

@jy0x4f did you find a solution, because i have the same problem with DatasetZelda. I get the same error