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' #232

Open
HaoqianSong opened this issue Oct 28, 2023 · 5 comments
Open

Comments

@HaoqianSong
Copy link

python main.py --output_dir /home/pcl/DETR/DINOout -c config/DINO/DINO_4scale.py --coco_path /home/pcl/DETR/DETRinput/ --options dn_scalar=100 embed_init_tgt=TRUE dn_label_coef=1.0 dn_bbox_coef=1.0 use_ema=False dn_box_noise_scale=1.0 --pretrain_model_path ./checkpoint0033_4scale.pth --finetune_ignore label_enc.weight class_embed
Not using distributed mode
Loading config file from config/DINO/DINO_4scale.py
Traceback (most recent call last):
File "main.py", line 388, in
main(args)
File "main.py", line 96, in main
cfg.dump(save_cfg_path)
File "/home/pcl/DETR/DETR/9DINO/DINO-main/util/slconfig.py", line 363, in dump
f.write(self.pretty_text)
File "/home/pcl/DETR/DETR/9DINO/DINO-main/util/slconfig.py", line 317, in pretty_text
text, _ = FormatCode(text, style_config=yapf_style, verify=True)
TypeError: FormatCode() got an unexpected keyword argument 'verify'

这是什么问题?如何解决?

@HaoqianSong
Copy link
Author

File "/home/pcl/DETR/DETR/9DINO/DINO-main/util/slconfig.py", line 317, in pretty_text
改为这样 text, _ = FormatCode(text, style_config=yapf_style) #, verify=True

可以训练,不知道有没有问题,会不会影响训练效果?

@SWHL
Copy link

SWHL commented Oct 30, 2023

我也遇到同样问题了,看着这个只是用来规范化代码的,似乎没啥影响

@LANDDKPLA
Copy link

pip install numpy==1.23.5 yapf==0.40.1

@heitorrapela
Copy link

heitorrapela commented Nov 19, 2023

pip install numpy==1.23.5 yapf==0.40.1

I had the same problem, but I solved with this pip install. Thanks.

@ezthor
Copy link

ezthor commented Nov 28, 2023

pip install numpy==1.23.5 yapf==0.40.1

It works. Thanks

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

5 participants