[Question]: ernie-laytou模型官方命令微调docvqa任务报错 KeyError: 'bbox'
请提出你的问题
在使用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'
请问是什么原因呢?我也遇到了
This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。
This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。
This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。