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

TypeError: FormatCode() got an unexpected keyword argument 'verify #8

Open
Alan-D-Chen opened this issue Sep 28, 2023 · 3 comments
Open

Comments

@Alan-D-Chen
Copy link

/opt/conda/envs/openmmlab_MV2D2/lib/python3.8/site-packages/mmdet/utils/setup_env.py:48: UserWarning: Setting MKL_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
warnings.warn(
Traceback (most recent call last):
File "tools/train.py", line 275, in
main()
File "tools/train.py", line 191, in main
cfg.dump(osp.join(cfg.work_dir, osp.basename(args.config)))
File "/opt/conda/envs/openmmlab_MV2D2/lib/python3.8/site-packages/mmcv/utils/config.py", line 596, in dump
f.write(self.pretty_text)
File "/opt/conda/envs/openmmlab_MV2D2/lib/python3.8/site-packages/mmcv/utils/config.py", line 508, in pretty_text
text, _ = FormatCode(text, style_config=yapf_style, verify=True)
TypeError: FormatCode() got an unexpected keyword argument 'verify'
Traceback (most recent call last):
File "tools/train.py", line 275, in
main()
File "tools/train.py", line 191, in main
cfg.dump(osp.join(cfg.work_dir, osp.basename(args.config)))
File "/opt/conda/envs/openmmlab_MV2D2/lib/python3.8/site-packages/mmcv/utils/config.py", line 596, in dump
f.write(self.pretty_text)
File "/opt/conda/envs/openmmlab_MV2D2/lib/python3.8/site-packages/mmcv/utils/config.py", line 508, in pretty_text
text, _ = FormatCode(text, style_config=yapf_style, verify=True)
TypeError: FormatCode() got an unexpected keyword argument 'verify'
Traceback (most recent call last):
File "tools/train.py", line 275, in
main()
File "tools/train.py", line 191, in main
Traceback (most recent call last):
File "tools/train.py", line 275, in
cfg.dump(osp.join(cfg.work_dir, osp.basename(args.config)))
File "/opt/conda/envs/openmmlab_MV2D2/lib/python3.8/site-packages/mmcv/utils/config.py", line 596, in dump
main()
File "tools/train.py", line 191, in main
f.write(self.pretty_text)
File "/opt/conda/envs/openmmlab_MV2D2/lib/python3.8/site-packages/mmcv/utils/config.py", line 508, in pretty_text
cfg.dump(osp.join(cfg.work_dir, osp.basename(args.config)))
File "/opt/conda/envs/openmmlab_MV2D2/lib/python3.8/site-packages/mmcv/utils/config.py", line 596, in dump
text, _ = FormatCode(text, style_config=yapf_style, verify=True)
TypeError: FormatCode() got an unexpected keyword argument 'verify'
f.write(self.pretty_text)
File "/opt/conda/envs/openmmlab_MV2D2/lib/python3.8/site-packages/mmcv/utils/config.py", line 508, in pretty_text
text, _ = FormatCode(text, style_config=yapf_style, verify=True)
TypeError: FormatCode() got an unexpected keyword argument 'verify'

@Alan-D-Chen
Copy link
Author

I just follow the :
This implementation is built upon PETR, and can be constructed as the install.md.

Environments
Linux, Python == 3.8.10, CUDA == 11.3, pytorch == 1.11.0, mmcv == 1.6.1, mmdet == 2.25.1, mmdet3d == 1.0.0, mmsegmentation == 0.28.0

Detection Data
Follow the mmdet3d to process the nuScenes dataset (https://github.com/open-mmlab/mmdetection3d/blob/master/docs/en/data_preparation.md).

Pretrained weights
We use nuImages pretrained weights from mmdetection3d. Download the pretrained weights and put them into weights/ directory.

But I just get this problem:
File "/opt/conda/envs/openmmlab_MV2D2/lib/python3.8/site-packages/mmcv/utils/config.py", line 508, in pretty_text
text, _ = FormatCode(text, style_config=yapf_style, verify=True)
TypeError: FormatCode() got an unexpected keyword argument 'verify'

How do I do ???

@Alan-D-Chen
Copy link
Author

The above problem has been solved.
But I got a new one.

FileNotFoundError: [Errno 2] No such file or directory: 'data/nuscenes/mmdet3d_nuscenes_30f_infos_train.pkl'

@wangzt-halo
Copy link
Collaborator

The above problem has been solved. But I got a new one.

FileNotFoundError: [Errno 2] No such file or directory: 'data/nuscenes/mmdet3d_nuscenes_30f_infos_train.pkl'

This file can be obtained by tools/generate_sweep_pkl.py

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