IDEA-Research / DINO

[ICLR 2023] Official implementation of the paper "DINO: DETR with Improved DeNoising Anchor Boxes for End-to-End Object Detection"
Apache License 2.0
2.26k stars 252 forks source link

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

Open HaoqianSong opened 1 year ago

HaoqianSong commented 1 year ago

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 prettytext text, = FormatCode(text, style_config=yapf_style, verify=True) TypeError: FormatCode() got an unexpected keyword argument 'verify'

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

HaoqianSong commented 1 year ago

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

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

SWHL commented 1 year ago

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

LANDDKPLA commented 1 year ago

pip install numpy==1.23.5 yapf==0.40.1

heitorrapela commented 11 months ago

pip install numpy==1.23.5 yapf==0.40.1

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

ezthor commented 11 months ago

pip install numpy==1.23.5 yapf==0.40.1

It works. Thanks

llmgpt commented 2 months ago

为什么不关掉这个issue?我也用的第一种方式.Why don't you close this issue? I did it the first way, too.