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] Fail to run mmpose due to issues in mmcv._ext #3181

Open
2 tasks done
bigpineappleking opened this issue Sep 26, 2024 · 1 comment
Open
2 tasks done

[Bug] Fail to run mmpose due to issues in mmcv._ext #3181

bigpineappleking opened this issue Sep 26, 2024 · 1 comment

Comments

@bigpineappleking
Copy link

Prerequisite

Environment

OrderedDict([('sys.platform', 'linux'), ('Python', '3.8.19 (default, Mar 20 2024, 19:58:24) [GCC 11.2.0]'), ('CUDA available', False), ('MUSA available', False), ('numpy_random_seed', 2147483648), ('GCC', 'gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-22)'), ('PyTorch', '2.3.1+cu121'), ('PyTorch compiling details', 'PyTorch built with:\n - GCC 9.3\n - C++ Version: 201703\n - Intel(R) oneAPI Math Kernel Library Version 2022.2-Product Build 20220804 for Intel(R) 64 architecture applications\n - Intel(R) MKL-DNN v3.3.6 (Git Hash 86e6af5974177e513fd3fee58425e1063e7f1361)\n - OpenMP 201511 (a.k.a. OpenMP 4.5)\n - LAPACK is enabled (usually provided by MKL)\n - NNPACK is enabled\n - CPU capability usage: AVX512\n - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=12.1, CUDNN_VERSION=8.9.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -D_GLIBCXX_USE_CXX11_ABI=0 -fabi-version=11 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOROCTRACER -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=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 -Wsuggest-override -Wno-psabi -Wno-error=pedantic -Wno-error=old-style-cast -Wno-missing-braces -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=2.3.1, USE_CUDA=ON, USE_CUDNN=ON, USE_CUSPARSELT=1, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_GLOO=ON, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=1, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, USE_ROCM_KERNEL_ASSERT=OFF, \n'), ('TorchVision', '0.18.1+cu121'), ('OpenCV', '4.10.0'), ('MMEngine', '0.10.5'), ('MMCV', '2.1.0'), ('MMCV Compiler', 'n/a'), ('MMCV CUDA Compiler', 'n/a')])

Installed mmcv==2.1.0 using pip inside a conda environment

Reproduces the problem - code sample

from mmpose.apis import (_track_by_iou, _track_by_oks,
convert_keypoint_definition, extract_pose_sequence,
inference_pose_lifter_model, inference_topdown,
init_model)

Reproduces the problem - command or script

start python

Reproduces the problem - error message

/dartfs-hpc/rc/home/p/f006zjp/.conda/envs/mmpose_new/lib/python3.8/site-packages/mmcv/cnn/bricks/transformer.py:33: UserWarning: Fail to import MultiScaleDeformableAttention from mmcv.ops.multi_scale_deform_attn, You should install mmcv rather than mmcv-lite if you need this module.
warnings.warn('Fail to import MultiScaleDeformableAttention from '
Traceback (most recent call last):
File "", line 1, in
File "/dartfs-hpc/rc/home/p/f006zjp/.conda/envs/mmpose_new/lib/python3.8/site-packages/mmpose/apis/init.py", line 2, in
from .inference import (collect_multi_frames, inference_bottomup,
File "/dartfs-hpc/rc/home/p/f006zjp/.conda/envs/mmpose_new/lib/python3.8/site-packages/mmpose/apis/inference.py", line 17, in
from mmpose.models.builder import build_pose_estimator
File "/dartfs-hpc/rc/home/p/f006zjp/.conda/envs/mmpose_new/lib/python3.8/site-packages/mmpose/models/init.py", line 8, in
from .heads import * # noqa
File "/dartfs-hpc/rc/home/p/f006zjp/.conda/envs/mmpose_new/lib/python3.8/site-packages/mmpose/models/heads/init.py", line 11, in
from .transformer_heads import EDPoseHead
File "/dartfs-hpc/rc/home/p/f006zjp/.conda/envs/mmpose_new/lib/python3.8/site-packages/mmpose/models/heads/transformer_heads/init.py", line 2, in
from .edpose_head import EDPoseHead
File "/dartfs-hpc/rc/home/p/f006zjp/.conda/envs/mmpose_new/lib/python3.8/site-packages/mmpose/models/heads/transformer_heads/edpose_head.py", line 14, in
from mmcv.ops import MultiScaleDeformableAttention
File "/dartfs-hpc/rc/home/p/f006zjp/.conda/envs/mmpose_new/lib/python3.8/site-packages/mmcv/ops/init.py", line 3, in
from .active_rotated_filter import active_rotated_filter
File "/dartfs-hpc/rc/home/p/f006zjp/.conda/envs/mmpose_new/lib/python3.8/site-packages/mmcv/ops/active_rotated_filter.py", line 10, in
ext_module = ext_loader.load_ext(
File "/dartfs-hpc/rc/home/p/f006zjp/.conda/envs/mmpose_new/lib/python3.8/site-packages/mmcv/utils/ext_loader.py", line 13, in load_ext
ext = importlib.import_module('mmcv.' + name)
File "/dartfs-hpc/rc/home/p/f006zjp/.conda/envs/mmpose_new/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'mmcv._ext'

Additional information

https://github.com/open-mmlab/mmpose/blob/main/demo/body3d_pose_lifter_demo.py

Fail to run mmpose

@HAOCHENYE
Copy link
Collaborator

/dartfs-hpc/rc/home/p/f006zjp/.conda/envs/mmpose_new/lib/python3.8/site-packages/mmcv/cnn/bricks/transformer.py:33: UserWarning: Fail to import MultiScaleDeformableAttention from mmcv.ops.multi_scale_deform_attn, You should install mmcv rather than mmcv-lite if you need this module.

As the warning says, you should install mmcv rather than mmcv-lite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants