PaddleNLP icon indicating copy to clipboard operation
PaddleNLP copied to clipboard

[Question]: ernie-laytou模型官方命令微调docvqa任务报错 KeyError: 'bbox'

Open PancakeAwesome opened this issue 2 years ago • 3 comments

请提出你的问题

在使用ernie-laytou模型官方命令微调docvqa任务会报错。运行命令和官方的微调命令一致: python3 -u run_mrc.py \ --model_name_or_path ernie-layoutx-base-uncased \ --output_dir ./ernie-layoutx-base-uncased/models/docvqa_zh/ \ --dataset_name docvqa_zh \ --do_train \ --do_eval \ --lang "ch" \ --num_train_epochs 6 \ --lr_scheduler_type linear \ --warmup_ratio 0.05 \ --weight_decay 0 \ --eval_steps 10000 \ --save_steps 10000 \ --save_total_limit 1 \ --load_best_model_at_end \ --pattern "mrc" \ --use_segment_box false \ --return_entity_level_metrics false \ --overwrite_cache false \ --doc_stride 128 \ --target_size 1000 \ --per_device_train_batch_size 8 \ --per_device_eval_batch_size 8 \ --learning_rate 2e-5 \ --preprocessing_num_workers 32 \ --save_total_limit 1 \ --train_nshard 16 \ --seed 1000 \ --metric_for_best_model anls \ --greater_is_better true \ --overwrite_output_dir

报错结果如下: Traceback (most recent call last): File "/opt/conda/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/opt/conda/lib/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/opt/conda/lib/python3.8/site-packages/paddle/io/dataloader/dataloader_iter.py", line 235, in _thread_loop batch = self._dataset_fetcher.fetch( File "/opt/conda/lib/python3.8/site-packages/paddle/io/dataloader/fetcher.py", line 85, in fetch data = self.collate_fn(data) File "/ossfs/workspace/jc/PaddleNLP-develop/model_zoo/ernie-layout/data_collator.py", line 64, in call feat["bbox"] = feat["bbox"] + [[0, 0, 0, 0] for _ in range(self.max_length - len(feat["bbox"]))] KeyError: 'bbox'

PancakeAwesome avatar Nov 07 '23 06:11 PancakeAwesome

请问是什么原因呢?我也遇到了

wushanzha avatar Dec 15 '23 03:12 wushanzha

This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。

github-actions[bot] avatar Feb 14 '24 00:02 github-actions[bot]

This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。

github-actions[bot] avatar Apr 27 '24 00:04 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。

github-actions[bot] avatar May 12 '24 00:05 github-actions[bot]