问题遇到的现象和发生背景
尝试调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)