mmrotate
mmrotate copied to clipboard
[Bug] TypeError: FormatCode() got an unexpected keyword argument 'verify'
Prerequisite
- [X] I have searched Issues and Discussions but cannot get the expected help.
- [X] I have read the FAQ documentation but cannot get the expected help.
- [X] The bug has not been fixed in the latest version (master) or latest version (1.x).
Task
I'm using the official example scripts/configs for the officially supported tasks/models/datasets.
Branch
1.x branch https://github.com/open-mmlab/mmrotate/tree/1.x
Environment
NVIDIA RTX A4000 with CUDA capability sm_86 is not compatible with the current PyTorch installation. The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_61 sm_70 sm_75 compute_37. If you want to use the NVIDIA RTX A4000 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name)) sys.platform: linux Python: 3.8.18 (default, Sep 11 2023, 13:40:15) [GCC 11.2.0] CUDA available: True numpy_random_seed: 2147483648 GPU 0,1,2,3: NVIDIA RTX A4000 CUDA_HOME: /usr/local/cuda NVCC: Cuda compilation tools, release 11.3, V11.3.58 GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 PyTorch: 1.8.0 PyTorch compiling details: PyTorch built with:
- GCC 7.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 v1.7.0 (Git Hash 7aed236906b1f7a05c0917e5257a1af05e9ff683)
- OpenMP 201511 (a.k.a. OpenMP 4.5)
- NNPACK is enabled
- CPU capability usage: AVX2
- CUDA Runtime 10.2
- 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_37,code=compute_37
- CuDNN 7.6.5
- Magma 2.5.2
- Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=10.2, CUDNN_VERSION=7.6.5, CXX_COMPILER=/opt/rh/devtoolset-7/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 -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -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 -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.8.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON,
TorchVision: 0.9.0 OpenCV: 4.8.0 MMEngine: 0.8.4 MMRotate: 1.0.0rc1+fd60bef
Reproduces the problem - code sample
我在运行1.x版本的RTMDET时,遇到了如下问题具体的下写在下方
Reproduces the problem - command or script
python tools/train.py /home/dell/Research/zly/mm1/mmrotate/configs/rotated_rtmdet/rotated_rtmdet_l-3x-dota.py
Reproduces the problem - error message
(zly1) zly@dell-PowerEdge-T640:/home/dell/Research/zly/mm1/mmrotate$ python tools/train.py /home/dell/Research/zly/mm1/mmrotate/configs/rotated_rtmdet/rotated_rtmdet_l-3x-dota.py /home/zly/.conda/envs/zly1/lib/python3.8/site-packages/torch/cuda/init.py:104: UserWarning: NVIDIA RTX A4000 with CUDA capability sm_86 is not compatible with the current PyTorch installation. The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_61 sm_70 sm_75 compute_37. If you want to use the NVIDIA RTX A4000 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name)) 09/25 10:35:17 - mmengine - INFO -
System environment: sys.platform: linux Python: 3.8.18 (default, Sep 11 2023, 13:40:15) [GCC 11.2.0] CUDA available: True numpy_random_seed: 756296170 GPU 0,1,2,3: NVIDIA RTX A4000 CUDA_HOME: /usr/local/cuda NVCC: Cuda compilation tools, release 11.3, V11.3.58 GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 PyTorch: 1.8.0 PyTorch compiling details: PyTorch built with:
-
GCC 7.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 v1.7.0 (Git Hash 7aed236906b1f7a05c0917e5257a1af05e9ff683)
-
OpenMP 201511 (a.k.a. OpenMP 4.5)
-
NNPACK is enabled
-
CPU capability usage: AVX2
-
CUDA Runtime 10.2
-
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_37,code=compute_37
-
CuDNN 7.6.5
-
Magma 2.5.2
-
Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=10.2, CUDNN_VERSION=7.6.5, CXX_COMPILER=/opt/rh/devtoolset-7/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 -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -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 -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.8.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON,
TorchVision: 0.9.0 OpenCV: 4.8.0 MMEngine: 0.8.4
Runtime environment: cudnn_benchmark: False mp_cfg: {'mp_start_method': 'fork', 'opencv_num_threads': 0} dist_cfg: {'backend': 'nccl'} seed: 756296170 Distributed launcher: none Distributed training: False GPU number: 1
Traceback (most recent call last): File "/home/zly/.local/lib/python3.8/site-packages/mmengine/config/config.py", line 1475, in pretty_text text, _ = FormatCode( TypeError: FormatCode() got an unexpected keyword argument 'verify'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "tools/train.py", line 125, in
Additional information
No response
这是我目前的环境,在使用demo下载pth文件时也会遇到类似报错
mim download mmrotate --config oriented-rcnn-le90_r50_fpn_1x_dota --dest .
Package Version Editable project location
addict 2.4.0 aliyun-python-sdk-core 2.13.36 aliyun-python-sdk-kms 2.16.2 certifi 2023.7.22 cffi 1.15.1 charset-normalizer 3.2.0 click 8.1.7 colorama 0.4.6 contourpy 1.1.1 crcmod 1.7 cryptography 41.0.4 cycler 0.11.0 fonttools 4.42.1 idna 3.4 importlib-metadata 6.8.0 importlib-resources 6.1.0 jmespath 0.10.0 kiwisolver 1.4.5 Markdown 3.4.4 markdown-it-py 3.0.0 matplotlib 3.7.3 mdurl 0.1.2 mkl-fft 1.3.8 mkl-random 1.2.4 mkl-service 2.4.0 mmcv 2.0.1 mmdet 3.1.0 /home/dell/Research/zly/mmdetection mmengine 0.8.4 mmrotate 1.0.0rc1 /home/dell/Research/zly/mm1/mmrotate model-index 0.1.11 numpy 1.24.3 opencv-python 4.8.0.76 opendatalab 0.0.10 openmim 0.3.9 openxlab 0.0.25 ordered-set 4.1.0 oss2 2.17.0 packaging 23.1 pandas 2.0.3 Pillow 9.3.0 pip 23.2.1 platformdirs 3.10.0 pycocotools 2.0.7 pycparser 2.21 pycryptodome 3.19.0 Pygments 2.16.1 pyparsing 3.1.1 python-dateutil 2.8.2 pytz 2023.3.post1 PyYAML 6.0.1 requests 2.28.2 rich 13.4.2 scipy 1.10.1 setuptools 60.2.0 shapely 2.0.1 six 1.16.0 tabulate 0.9.0 termcolor 2.3.0 terminaltables 3.1.10 tomli 2.0.1 torch 1.8.0 torchvision 0.9.0 tqdm 4.65.2 typing_extensions 4.7.1 tzdata 2023.3 urllib3 1.26.16 wheel 0.38.4 yapf 0.40.2 zipp 3.17.0
how did u fix it? when i downloaded config file using mim, my file always met this error
how did u fix it? when i downloaded config file using mim, my file always met this error
I haven't solved it yet
I can fix this TypeError: FormatCode() got an unexpected keyword argument 'verify' by uninstall 'yapf ' and then pip install yapf==0.40.1
thank you, when i try the version: Package Version Source
mmcv-full 1.5.3 https://github.com/open-mmlab/mmcv mmdet 2.25.1 https://github.com/open-mmlab/mmdetection mmengine 0.8.5 https://github.com/open-mmlab/mmengine mmrotate 0.3.4 /content/mmrotate it disappeared
I can fix this TypeError: FormatCode() got an unexpected keyword argument 'verify' by uninstall 'yapf ' and then pip install yapf==0.40.1
thank you very much