jackroos/VL-BERT

__init__() missing 2 required positional arguments: 'doc' and 'pos'

tqace opened this issue · 3 comments

tqace commented

Traceback (most recent call last):
File "pretrain/train_end2end.py", line 51, in
main()
File "pretrain/train_end2end.py", line 47, in main
rank, model = train_net(args, config)
File "VL-BERT/pretrain/../pretrain/function/train.py", line 361, in train_net
gradient_accumulate_steps=config.TRAIN.GRAD_ACCUMULATE_STEPS)
File "VL-BERT/pretrain/../common/trainer.py", line 101, in train
for nbatch, batch in enumerate(train_loader):
File "VL-BERT/pretrain/../common/utils/multi_task_dataloader.py", line 35, in next
output_tuple = (*next(self.iters[0]), )
File "anaconda3/envs/vl-bert/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 582, in next
return self._process_next_batch(batch)
File "anaconda3/envs/vl-bert/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
TypeError: init() missing 2 required positional arguments: 'doc' and 'pos'

tqace commented

预训练的过程中,会跑着跑着报这个错误然后停掉

没遇到过,请问你的具体环境版本是多少,包括系统,cuda,python和pytorch。

tqace commented

没遇到过,请问你的具体环境版本是多少,包括系统,cuda,python和pytorch。

解决了,应该是提取的bottom-up的json文件有一个空文件,导致dataloader出了问题,感谢回复