尝试调SSAN关系提取模型报错,解决不了
all_input_ids = torch.tensor([f.input_ids for f in features], dtype=torch.long)
报错内容
04/14/2022 15:55:16 - ERROR - transformers.tokenization_utils - Using bos_token, but it is not set yet.
04/14/2022 15:55:16 - ERROR - transformers.tokenization_utils - Using eos_token, but it is not set yet.
Traceback (most recent call last):
File "./run_docred.py", line 759, in
main()
File "./run_docred.py", line 699, in main
train_dataset = load_and_cache_examples(args, tokenizer, evaluate=False)
File "./run_docred.py", line 464, in load_and_cache_examples
all_input_ids = torch.tensor([f.input_ids for f in features], dtype=torch.long)
TypeError: an integer is required (got type NoneType)
bos_token 没有值,在run_docred.py 找一下这个值的定义,看看是怎么得的,好像是读取文本获取的?看看文件里面的内容