Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] - ImportError: /opt/conda/envs/mmagic/lib/python3.9/site-packages/mmcv/_ext.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZN3c105ErrorC2ENS_14SourceLocationESs #2115

Open
3 tasks done
Joish opened this issue Jan 17, 2024 · 0 comments
Assignees
Labels
kind/bug something isn't working

Comments

@Joish
Copy link

Joish commented Jan 17, 2024

Prerequisite

Task

I'm using the official example scripts/configs for the officially supported tasks/models/datasets.

Branch

main branch https://github.com/open-mmlab/mmagic

Environment

when I ran python mmagic/utils/collect_env.py

/opt/conda/envs/mmagic/lib/python3.9/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: 'libc10_cuda.so: cannot open shared object file: No such file or directory'If you don't plan on using image functionality from `torchvision.io`, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have `libjpeg` or `libpng` installed before building `torchvision` from source?
  warn(
Traceback (most recent call last):
  File "/mnt/data/mmagic/mmagic/utils/collect_env.py", line 17, in <module>
    for name, val in collect_env().items():
  File "/mnt/data/mmagic/mmagic/utils/collect_env.py", line 10, in collect_env
    env_info = collect_base_env()
  File "/opt/conda/envs/mmagic/lib/python3.9/site-packages/mmcv/utils/env.py", line 72, in collect_env
    from mmcv.ops import get_compiler_version, get_compiling_cuda_version
  File "/opt/conda/envs/mmagic/lib/python3.9/site-packages/mmcv/ops/__init__.py", line 3, in <module>
    from .active_rotated_filter import active_rotated_filter
  File "/opt/conda/envs/mmagic/lib/python3.9/site-packages/mmcv/ops/active_rotated_filter.py", line 10, in <module>
    ext_module = ext_loader.load_ext(
  File "/opt/conda/envs/mmagic/lib/python3.9/site-packages/mmcv/utils/ext_loader.py", line 13, in load_ext
    ext = importlib.import_module('mmcv.' + name)
  File "/opt/conda/envs/mmagic/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /opt/conda/envs/mmagic/lib/python3.9/site-packages/mmcv/_ext.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZN3c105ErrorC2ENS_14SourceLocationESs

How you installed?
I followed instruction from here

Other Info:
using diffusers==0.24.0 as diffusers==0.25.0 was throwing No module named 'diffusers.pipelines.controlnet_xs'
using mmcv==2.1.0

Reproduces the problem - code sample

na

Reproduces the problem - command or script

python tools/test.py configs/basicvsr_pp/basicvsr-pp_c64n7_8xb1-600k_reds4.py https://download.openmmlab.com/mmediting/restorers/basicvsr_plusplus/basicvsr_plusplus_c64n7_8x1_600k_reds4_20210217-db622b2f.pth

Reproduces the problem - error message

/opt/conda/envs/mmagic/lib/python3.9/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: 'libc10_cuda.so: cannot open shared object file: No such file or directory'If you don't plan on using image functionality from `torchvision.io`, you can ignore this warning. Otherwise, there might be something wrong with your environment. Did you have `libjpeg` or `libpng` installed before building `torchvision` from source?
  warn(
01/17 21:18:45 - mmengine - INFO - 
------------------------------------------------------------
System environment:
    sys.platform: linux
    Python: 3.9.18 | packaged by conda-forge | (main, Dec 23 2023, 16:33:10) [GCC 12.3.0]
    CUDA available: False
    numpy_random_seed: 1820081447
    GCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
    PyTorch: 2.1.0
    PyTorch compiling details: PyTorch built with:
  - GCC 12.3
  - C++ Version: 201703
  - Intel(R) MKL-DNN v3.1.1 (Git Hash 64f6bcbcbab628e96f33a62c3e975f8535a7bde4)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - LAPACK is enabled (usually provided by MKL)
  - NNPACK is enabled
  - CPU capability usage: AVX2
  - Build settings: BLAS_INFO=open, BUILD_TYPE=Release, CXX_COMPILER=/home/conda/feedstock_root/build_artifacts/pytorch-recipe_1699230989218/_build_env/bin/x86_64-conda-linux-gnu-c++, CXX_FLAGS=-fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/conda/feedstock_root/build_artifacts/pytorch-recipe_1699230989218/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/pytorch-recipe_1699230989218/work=/usr/local/src/conda/pytorch-2.1.0 -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/pytorch-recipe_1699230989218/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh=/usr/local/src/conda-prefix -Wno-deprecated-declarations -Wno-error=maybe-uninitialized -D_GLIBCXX_USE_CXX11_ABI=1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -DNDEBUG -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Werror=range-loop-construct -Werror=bool-operation -Wnarrowing -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=old-style-cast -Wno-invalid-partial-specialization -Wno-unused-private-field -Wno-aligned-allocation-unavailable -Wno-missing-braces -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=open, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_DISABLE_GPU_ASSERTS=ON, TORCH_VERSION=2.1.0, USE_CUDA=0, USE_CUDNN=OFF, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKLDNN=1, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, 

    TorchVision: 0.16.0
    OpenCV: 4.9.0
    MMEngine: 0.10.2

Runtime environment:
    cudnn_benchmark: False
    mp_cfg: {'mp_start_method': 'fork', 'opencv_num_threads': 4}
    dist_cfg: {'backend': 'nccl'}
    seed: 1820081447
    Distributed launcher: none
    Distributed training: False
    GPU number: 1
------------------------------------------------------------

01/17 21:18:45 - mmengine - INFO - Config:
custom_hooks = [
    dict(interval=1, type='BasicVisualizationHook'),
]
data_root = 'data/REDS'
default_hooks = dict(
    checkpoint=dict(
        by_epoch=False,
        interval=5000,
        max_keep_ckpts=10,
        out_dir='./work_dirs',
        rule='greater',
        save_best='PSNR',
        type='CheckpointHook'),
    logger=dict(interval=100, type='LoggerHook'),
    param_scheduler=dict(type='ParamSchedulerHook'),
    sampler_seed=dict(type='DistSamplerSeedHook'),
    timer=dict(type='IterTimerHook'))
default_scope = 'mmagic'
demo_pipeline = [
    dict(interval_list=[
        1,
    ], type='GenerateSegmentIndices'),
    dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
    dict(type='PackInputs'),
]
env_cfg = dict(
    cudnn_benchmark=False,
    dist_cfg=dict(backend='nccl'),
    mp_cfg=dict(mp_start_method='fork', opencv_num_threads=4))
experiment_name = 'basicvsr-pp_c64n7_8xb1-600k_reds4'
find_unused_parameters = True
launcher = 'none'
load_from = 'https://download.openmmlab.com/mmediting/restorers/basicvsr_plusplus/basicvsr_plusplus_c64n7_8x1_600k_reds4_20210217-db622b2f.pth'
log_level = 'INFO'
log_processor = dict(by_epoch=False, type='LogProcessor', window_size=100)
model = dict(
    data_preprocessor=dict(
        mean=[
            0.0,
            0.0,
            0.0,
        ],
        std=[
            255.0,
            255.0,
            255.0,
        ],
        type='DataPreprocessor'),
    generator=dict(
        is_low_res_input=True,
        mid_channels=64,
        num_blocks=7,
        spynet_pretrained=
        'https://download.openmmlab.com/mmediting/restorers/basicvsr/spynet_20210409-c6c1bd09.pth',
        type='BasicVSRPlusPlusNet'),
    pixel_loss=dict(loss_weight=1.0, reduction='mean', type='CharbonnierLoss'),
    train_cfg=dict(fix_iter=5000),
    type='BasicVSR')
optim_wrapper = dict(
    constructor='DefaultOptimWrapperConstructor',
    optimizer=dict(betas=(
        0.9,
        0.99,
    ), lr=0.0001, type='Adam'),
    paramwise_cfg=dict(custom_keys=dict(spynet=dict(lr_mult=0.25))),
    type='OptimWrapper')
param_scheduler = dict(
    by_epoch=False,
    eta_min=1e-07,
    periods=[
        600000,
    ],
    restart_weights=[
        1,
    ],
    type='CosineRestartLR')
reds_data_root = 'data/REDS'
reds_dataloader = dict(
    batch_size=1,
    dataset=dict(
        ann_file='meta_info_reds4_val.txt',
        data_prefix=dict(gt='train_sharp', img='train_sharp_bicubic/X4'),
        data_root='data/REDS',
        depth=1,
        fixed_seq_len=100,
        metainfo=dict(dataset_type='reds_reds4', task_name='vsr'),
        num_input_frames=100,
        pipeline=[
            dict(interval_list=[
                1,
            ], type='GenerateSegmentIndices'),
            dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
            dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
            dict(type='PackInputs'),
        ],
        type='BasicFramesDataset'),
    num_workers=1,
    persistent_workers=False,
    sampler=dict(shuffle=False, type='DefaultSampler'))
reds_evaluator = [
    dict(prefix='REDS4-BIx4-RGB', type='PSNR'),
    dict(prefix='REDS4-BIx4-RGB', type='SSIM'),
]
reds_pipeline = [
    dict(interval_list=[
        1,
    ], type='GenerateSegmentIndices'),
    dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
    dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
    dict(type='PackInputs'),
]
resume = False
save_dir = './work_dirs'
scale = 4
test_cfg = dict(type='MultiTestLoop')
test_dataloader = [
    dict(
        batch_size=1,
        dataset=dict(
            ann_file='meta_info_reds4_val.txt',
            data_prefix=dict(gt='train_sharp', img='train_sharp_bicubic/X4'),
            data_root='data/REDS',
            depth=1,
            fixed_seq_len=100,
            metainfo=dict(dataset_type='reds_reds4', task_name='vsr'),
            num_input_frames=100,
            pipeline=[
                dict(interval_list=[
                    1,
                ], type='GenerateSegmentIndices'),
                dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
                dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
                dict(type='PackInputs'),
            ],
            type='BasicFramesDataset'),
        num_workers=1,
        persistent_workers=False,
        sampler=dict(shuffle=False, type='DefaultSampler')),
    dict(
        batch_size=1,
        dataset=dict(
            ann_file='meta_info_Vimeo90K_test_GT.txt',
            data_prefix=dict(gt='GT', img='BDx4'),
            data_root='data/vimeo90k',
            depth=2,
            fixed_seq_len=7,
            load_frames_list=dict(
                gt=[
                    'im4.png',
                ],
                img=[
                    'im1.png',
                    'im2.png',
                    'im3.png',
                    'im4.png',
                    'im5.png',
                    'im6.png',
                    'im7.png',
                ]),
            metainfo=dict(dataset_type='vimeo90k_seq', task_name='vsr'),
            num_input_frames=7,
            pipeline=[
                dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
                dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
                dict(keys=[
                    'img',
                ], type='MirrorSequence'),
                dict(type='PackInputs'),
            ],
            type='BasicFramesDataset'),
        num_workers=1,
        persistent_workers=False,
        sampler=dict(shuffle=False, type='DefaultSampler')),
    dict(
        batch_size=1,
        dataset=dict(
            ann_file='meta_info_Vimeo90K_test_GT.txt',
            data_prefix=dict(gt='GT', img='BIx4'),
            data_root='data/vimeo90k',
            depth=2,
            fixed_seq_len=7,
            load_frames_list=dict(
                gt=[
                    'im4.png',
                ],
                img=[
                    'im1.png',
                    'im2.png',
                    'im3.png',
                    'im4.png',
                    'im5.png',
                    'im6.png',
                    'im7.png',
                ]),
            metainfo=dict(dataset_type='vimeo90k_seq', task_name='vsr'),
            num_input_frames=7,
            pipeline=[
                dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
                dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
                dict(keys=[
                    'img',
                ], type='MirrorSequence'),
                dict(type='PackInputs'),
            ],
            type='BasicFramesDataset'),
        num_workers=1,
        persistent_workers=False,
        sampler=dict(shuffle=False, type='DefaultSampler')),
    dict(
        batch_size=1,
        dataset=dict(
            data_prefix=dict(gt='GT', img='BDx4'),
            data_root='data/UDM10',
            metainfo=dict(dataset_type='udm10', task_name='vsr'),
            pipeline=[
                dict(
                    filename_tmpl='{:04d}.png',
                    interval_list=[
                        1,
                    ],
                    type='GenerateSegmentIndices'),
                dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
                dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
                dict(type='PackInputs'),
            ],
            type='BasicFramesDataset'),
        num_workers=1,
        persistent_workers=False,
        sampler=dict(shuffle=False, type='DefaultSampler')),
    dict(
        batch_size=1,
        dataset=dict(
            ann_file='meta_info_Vid4_GT.txt',
            data_prefix=dict(gt='GT', img='BDx4'),
            data_root='data/Vid4',
            depth=1,
            metainfo=dict(dataset_type='vid4', task_name='vsr'),
            pipeline=[
                dict(interval_list=[
                    1,
                ], type='GenerateSegmentIndices'),
                dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
                dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
                dict(type='PackInputs'),
            ],
            type='BasicFramesDataset'),
        num_workers=1,
        persistent_workers=False,
        sampler=dict(shuffle=False, type='DefaultSampler')),
    dict(
        batch_size=1,
        dataset=dict(
            ann_file='meta_info_Vid4_GT.txt',
            data_prefix=dict(gt='GT', img='BIx4'),
            data_root='data/Vid4',
            depth=1,
            metainfo=dict(dataset_type='vid4', task_name='vsr'),
            pipeline=[
                dict(interval_list=[
                    1,
                ], type='GenerateSegmentIndices'),
                dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
                dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
                dict(type='PackInputs'),
            ],
            type='BasicFramesDataset'),
        num_workers=1,
        persistent_workers=False,
        sampler=dict(shuffle=False, type='DefaultSampler')),
]
test_evaluator = [
    [
        dict(prefix='REDS4-BIx4-RGB', type='PSNR'),
        dict(prefix='REDS4-BIx4-RGB', type='SSIM'),
    ],
    [
        dict(convert_to='Y', prefix='Vimeo-90K-T-BDx4-Y', type='PSNR'),
        dict(convert_to='Y', prefix='Vimeo-90K-T-BDx4-Y', type='SSIM'),
    ],
    [
        dict(convert_to='Y', prefix='Vimeo-90K-T-BIx4-Y', type='PSNR'),
        dict(convert_to='Y', prefix='Vimeo-90K-T-BIx4-Y', type='SSIM'),
    ],
    [
        dict(convert_to='Y', prefix='UDM10-BDx4-Y', type='PSNR'),
        dict(convert_to='Y', prefix='UDM10-BDx4-Y', type='SSIM'),
    ],
    [
        dict(convert_to='Y', prefix='VID4-BDx4-Y', type='PSNR'),
        dict(convert_to='Y', prefix='VID4-BDx4-Y', type='SSIM'),
    ],
    [
        dict(convert_to='Y', prefix='VID4-BIx4-Y', type='PSNR'),
        dict(convert_to='Y', prefix='VID4-BIx4-Y', type='SSIM'),
    ],
]
train_cfg = dict(
    max_iters=600000, type='IterBasedTrainLoop', val_interval=5000)
train_dataloader = dict(
    batch_size=1,
    dataset=dict(
        ann_file='meta_info_reds4_train.txt',
        data_prefix=dict(gt='train_sharp', img='train_sharp_bicubic/X4'),
        data_root='data/REDS',
        depth=1,
        metainfo=dict(dataset_type='reds_reds4', task_name='vsr'),
        num_input_frames=30,
        pipeline=[
            dict(interval_list=[
                1,
            ], type='GenerateSegmentIndices'),
            dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
            dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
            dict(dictionary=dict(scale=4), type='SetValues'),
            dict(gt_patch_size=256, type='PairedRandomCrop'),
            dict(
                direction='horizontal',
                flip_ratio=0.5,
                keys=[
                    'img',
                    'gt',
                ],
                type='Flip'),
            dict(
                direction='vertical',
                flip_ratio=0.5,
                keys=[
                    'img',
                    'gt',
                ],
                type='Flip'),
            dict(
                keys=[
                    'img',
                    'gt',
                ],
                transpose_ratio=0.5,
                type='RandomTransposeHW'),
            dict(type='PackInputs'),
        ],
        type='BasicFramesDataset'),
    num_workers=6,
    persistent_workers=False,
    sampler=dict(shuffle=True, type='InfiniteSampler'))
train_pipeline = [
    dict(interval_list=[
        1,
    ], type='GenerateSegmentIndices'),
    dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
    dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
    dict(dictionary=dict(scale=4), type='SetValues'),
    dict(gt_patch_size=256, type='PairedRandomCrop'),
    dict(
        direction='horizontal',
        flip_ratio=0.5,
        keys=[
            'img',
            'gt',
        ],
        type='Flip'),
    dict(
        direction='vertical',
        flip_ratio=0.5,
        keys=[
            'img',
            'gt',
        ],
        type='Flip'),
    dict(keys=[
        'img',
        'gt',
    ], transpose_ratio=0.5, type='RandomTransposeHW'),
    dict(type='PackInputs'),
]
udm10_data_root = 'data/UDM10'
udm10_dataloader = dict(
    batch_size=1,
    dataset=dict(
        data_prefix=dict(gt='GT', img='BDx4'),
        data_root='data/UDM10',
        metainfo=dict(dataset_type='udm10', task_name='vsr'),
        pipeline=[
            dict(
                filename_tmpl='{:04d}.png',
                interval_list=[
                    1,
                ],
                type='GenerateSegmentIndices'),
            dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
            dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
            dict(type='PackInputs'),
        ],
        type='BasicFramesDataset'),
    num_workers=1,
    persistent_workers=False,
    sampler=dict(shuffle=False, type='DefaultSampler'))
udm10_evaluator = [
    dict(convert_to='Y', prefix='UDM10-BDx4-Y', type='PSNR'),
    dict(convert_to='Y', prefix='UDM10-BDx4-Y', type='SSIM'),
]
udm10_pipeline = [
    dict(
        filename_tmpl='{:04d}.png',
        interval_list=[
            1,
        ],
        type='GenerateSegmentIndices'),
    dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
    dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
    dict(type='PackInputs'),
]
val_cfg = dict(type='MultiValLoop')
val_dataloader = dict(
    batch_size=1,
    dataset=dict(
        ann_file='meta_info_reds4_val.txt',
        data_prefix=dict(gt='train_sharp', img='train_sharp_bicubic/X4'),
        data_root='data/REDS',
        depth=1,
        fixed_seq_len=100,
        metainfo=dict(dataset_type='reds_reds4', task_name='vsr'),
        num_input_frames=100,
        pipeline=[
            dict(interval_list=[
                1,
            ], type='GenerateSegmentIndices'),
            dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
            dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
            dict(type='PackInputs'),
        ],
        type='BasicFramesDataset'),
    num_workers=1,
    persistent_workers=False,
    sampler=dict(shuffle=False, type='DefaultSampler'))
val_evaluator = dict(
    metrics=[
        dict(type='PSNR'),
        dict(type='SSIM'),
    ], type='Evaluator')
val_pipeline = [
    dict(interval_list=[
        1,
    ], type='GenerateSegmentIndices'),
    dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
    dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
    dict(type='PackInputs'),
]
vid4_bd_dataloader = dict(
    batch_size=1,
    dataset=dict(
        ann_file='meta_info_Vid4_GT.txt',
        data_prefix=dict(gt='GT', img='BDx4'),
        data_root='data/Vid4',
        depth=1,
        metainfo=dict(dataset_type='vid4', task_name='vsr'),
        pipeline=[
            dict(interval_list=[
                1,
            ], type='GenerateSegmentIndices'),
            dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
            dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
            dict(type='PackInputs'),
        ],
        type='BasicFramesDataset'),
    num_workers=1,
    persistent_workers=False,
    sampler=dict(shuffle=False, type='DefaultSampler'))
vid4_bd_evaluator = [
    dict(convert_to='Y', prefix='VID4-BDx4-Y', type='PSNR'),
    dict(convert_to='Y', prefix='VID4-BDx4-Y', type='SSIM'),
]
vid4_bi_dataloader = dict(
    batch_size=1,
    dataset=dict(
        ann_file='meta_info_Vid4_GT.txt',
        data_prefix=dict(gt='GT', img='BIx4'),
        data_root='data/Vid4',
        depth=1,
        metainfo=dict(dataset_type='vid4', task_name='vsr'),
        pipeline=[
            dict(interval_list=[
                1,
            ], type='GenerateSegmentIndices'),
            dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
            dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
            dict(type='PackInputs'),
        ],
        type='BasicFramesDataset'),
    num_workers=1,
    persistent_workers=False,
    sampler=dict(shuffle=False, type='DefaultSampler'))
vid4_bi_evaluator = [
    dict(convert_to='Y', prefix='VID4-BIx4-Y', type='PSNR'),
    dict(convert_to='Y', prefix='VID4-BIx4-Y', type='SSIM'),
]
vid4_data_root = 'data/Vid4'
vid4_pipeline = [
    dict(interval_list=[
        1,
    ], type='GenerateSegmentIndices'),
    dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
    dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
    dict(type='PackInputs'),
]
vimeo_90k_bd_dataloader = dict(
    batch_size=1,
    dataset=dict(
        ann_file='meta_info_Vimeo90K_test_GT.txt',
        data_prefix=dict(gt='GT', img='BDx4'),
        data_root='data/vimeo90k',
        depth=2,
        fixed_seq_len=7,
        load_frames_list=dict(
            gt=[
                'im4.png',
            ],
            img=[
                'im1.png',
                'im2.png',
                'im3.png',
                'im4.png',
                'im5.png',
                'im6.png',
                'im7.png',
            ]),
        metainfo=dict(dataset_type='vimeo90k_seq', task_name='vsr'),
        num_input_frames=7,
        pipeline=[
            dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
            dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
            dict(keys=[
                'img',
            ], type='MirrorSequence'),
            dict(type='PackInputs'),
        ],
        type='BasicFramesDataset'),
    num_workers=1,
    persistent_workers=False,
    sampler=dict(shuffle=False, type='DefaultSampler'))
vimeo_90k_bd_evaluator = [
    dict(convert_to='Y', prefix='Vimeo-90K-T-BDx4-Y', type='PSNR'),
    dict(convert_to='Y', prefix='Vimeo-90K-T-BDx4-Y', type='SSIM'),
]
vimeo_90k_bi_dataloader = dict(
    batch_size=1,
    dataset=dict(
        ann_file='meta_info_Vimeo90K_test_GT.txt',
        data_prefix=dict(gt='GT', img='BIx4'),
        data_root='data/vimeo90k',
        depth=2,
        fixed_seq_len=7,
        load_frames_list=dict(
            gt=[
                'im4.png',
            ],
            img=[
                'im1.png',
                'im2.png',
                'im3.png',
                'im4.png',
                'im5.png',
                'im6.png',
                'im7.png',
            ]),
        metainfo=dict(dataset_type='vimeo90k_seq', task_name='vsr'),
        num_input_frames=7,
        pipeline=[
            dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
            dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
            dict(keys=[
                'img',
            ], type='MirrorSequence'),
            dict(type='PackInputs'),
        ],
        type='BasicFramesDataset'),
    num_workers=1,
    persistent_workers=False,
    sampler=dict(shuffle=False, type='DefaultSampler'))
vimeo_90k_bi_evaluator = [
    dict(convert_to='Y', prefix='Vimeo-90K-T-BIx4-Y', type='PSNR'),
    dict(convert_to='Y', prefix='Vimeo-90K-T-BIx4-Y', type='SSIM'),
]
vimeo_90k_data_root = 'data/vimeo90k'
vimeo_90k_file_list = [
    'im1.png',
    'im2.png',
    'im3.png',
    'im4.png',
    'im5.png',
    'im6.png',
    'im7.png',
]
vimeo_90k_pipeline = [
    dict(channel_order='rgb', key='img', type='LoadImageFromFile'),
    dict(channel_order='rgb', key='gt', type='LoadImageFromFile'),
    dict(keys=[
        'img',
    ], type='MirrorSequence'),
    dict(type='PackInputs'),
]
vis_backends = [
    dict(type='LocalVisBackend'),
]
visualizer = dict(
    bgr2rgb=True,
    fn_key='gt_path',
    img_keys=[
        'gt_img',
        'input',
        'pred_img',
    ],
    type='ConcatImageVisualizer',
    vis_backends=[
        dict(type='LocalVisBackend'),
    ])
work_dir = './work_dirs/basicvsr-pp_c64n7_8xb1-600k_reds4'

Traceback (most recent call last):
  File "/mnt/data/mmagic/tools/test.py", line 89, in <module>
    main()
  File "/mnt/data/mmagic/tools/test.py", line 69, in main
    runner = Runner.from_cfg(cfg)
  File "/opt/conda/envs/mmagic/lib/python3.9/site-packages/mmengine/runner/runner.py", line 462, in from_cfg
    runner = cls(
  File "/opt/conda/envs/mmagic/lib/python3.9/site-packages/mmengine/runner/runner.py", line 429, in __init__
    self.model = self.build_model(model)
  File "/opt/conda/envs/mmagic/lib/python3.9/site-packages/mmengine/runner/runner.py", line 836, in build_model
    model = MODELS.build(model)
  File "/opt/conda/envs/mmagic/lib/python3.9/site-packages/mmengine/registry/registry.py", line 570, in build
    return self.build_func(cfg, *args, **kwargs, registry=self)
  File "/opt/conda/envs/mmagic/lib/python3.9/site-packages/mmengine/registry/build_functions.py", line 232, in build_model_from_cfg
    return build_from_cfg(cfg, registry, default_args)
  File "/opt/conda/envs/mmagic/lib/python3.9/site-packages/mmengine/registry/build_functions.py", line 98, in build_from_cfg
    obj_cls = registry.get(obj_type)
  File "/opt/conda/envs/mmagic/lib/python3.9/site-packages/mmengine/registry/registry.py", line 451, in get
    self.import_from_location()
  File "/opt/conda/envs/mmagic/lib/python3.9/site-packages/mmengine/registry/registry.py", line 376, in import_from_location
    import_module(loc)
  File "/opt/conda/envs/mmagic/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/mnt/data/mmagic/mmagic/models/__init__.py", line 6, in <module>
    from .editors import *  # noqa: F401, F403
  File "/mnt/data/mmagic/mmagic/models/editors/__init__.py", line 6, in <module>
    from .basicvsr_plusplus_net import BasicVSRPlusPlusNet
  File "/mnt/data/mmagic/mmagic/models/editors/basicvsr_plusplus_net/__init__.py", line 2, in <module>
    from .basicvsr_plusplus_net import BasicVSRPlusPlusNet
  File "/mnt/data/mmagic/mmagic/models/editors/basicvsr_plusplus_net/basicvsr_plusplus_net.py", line 5, in <module>
    from mmcv.ops import ModulatedDeformConv2d, modulated_deform_conv2d
  File "/opt/conda/envs/mmagic/lib/python3.9/site-packages/mmcv/ops/__init__.py", line 3, in <module>
    from .active_rotated_filter import active_rotated_filter
  File "/opt/conda/envs/mmagic/lib/python3.9/site-packages/mmcv/ops/active_rotated_filter.py", line 10, in <module>
    ext_module = ext_loader.load_ext(
  File "/opt/conda/envs/mmagic/lib/python3.9/site-packages/mmcv/utils/ext_loader.py", line 13, in load_ext
    ext = importlib.import_module('mmcv.' + name)
  File "/opt/conda/envs/mmagic/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ImportError: /opt/conda/envs/mmagic/lib/python3.9/site-packages/mmcv/_ext.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZN3c105ErrorC2ENS_14SourceLocationESs```

### Additional information

1. Docker build is also failing.
2. Docs are very bad.
@Joish Joish added the kind/bug something isn't working label Jan 17, 2024
@Joish Joish changed the title [Bug] [Bug] - ImportError: /opt/conda/envs/mmagic/lib/python3.9/site-packages/mmcv/_ext.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZN3c105ErrorC2ENS_14SourceLocationESs Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants