WoojuLee24/OA-DG

FormatCode() got an unexpected keyword argument 'verify'

Closed this issue · 1 comments

Traceback (most recent call last):
File "/home/ailab/HDD/fl/OA-DG/tools/train.py", line 212, in
main()
File "/home/ailab/HDD/fl/OA-DG/tools/train.py", line 138, in main
cfg.dump(osp.join(cfg.work_dir, osp.basename(args.config)))
File "/home/ailab/miniconda3/envs/fl/lib/python3.9/site-packages/mmcv/utils/config.py", line 564, in dump
f.write(self.pretty_text)
File "/home/ailab/miniconda3/envs/fl/lib/python3.9/site-packages/mmcv/utils/config.py", line 502, in pretty_text
text, _ = FormatCode(text, style_config=yapf_style, verify=True)
TypeError: FormatCode() got an unexpected keyword argument 'verify'

成功安装mmcv-full之后遇到这个问题了。有人碰到过吗?

The issue might stem from a version compatibility problem between mmcv and yapf. I recommend you to follow one of three instructions:

  1. Please verify the compatible yapf version required by mmcv, and install it using:
    pip install yapf==[version]
  2. Our code is forked from mmdetection 2.28.x version. Please follow the instructions from https://mmdetection.readthedocs.io/en/v2.28.2/get_started.html#installation
  3. How about using our docker image? We have two versions:
    docker pull dnwn24/mmdetection:1.11.0-cuda11.3
    docker pull dnwn24/mmdetection:1.6.0-cuda10.1-cudnn7