您好,我在搭建好环境后,按照您的reademe.txt中的运行train.py语句进行运行,但出现如下报错:“Traceback (most recent call last):
File "train.py", line 304, in
main()
File "train.py", line 299, in main
ins = Instructor(opt)
File "train.py", line 39, in init
tokenizer = Tokenizer4Bert(opt.max_seq_len, opt.pretrained_bert_name)
File "E:\pycharm location\ABSA-PyTorch-master\data_utils.py", line 114, in init
self.tokenizer = BertTokenizer.from_pretrained(pretrained_bert_name)
File "E:\anaconda\envs\pytorch\lib\site-packages\transformers\tokenization_utils_base.py", line 1629, in from_pretrained
local_files_only=local_files_only,
File "E:\anaconda\envs\pytorch\lib\site-packages\transformers\file_utils.py", line 955, in cached_path
local_files_only=local_files_only,
File "E:\anaconda\envs\pytorch\lib\site-packages\transformers\file_utils.py", line 1125, in get_from_cache
"Connection error, and we cannot find the requested files in the cached path."
ValueError: Connection error, and we cannot find the requested files in the cached path. Please try again or make sure your Internet connection is on.”
请问您有什么好的解决方法吗?
您好,我在搭建好环境后,按照您的reademe.txt中的运行train.py语句进行运行,但出现如下报错:“Traceback (most recent call last): File "train.py", line 304, in
main()
File "train.py", line 299, in main
ins = Instructor(opt)
File "train.py", line 39, in init
tokenizer = Tokenizer4Bert(opt.max_seq_len, opt.pretrained_bert_name)
File "E:\pycharm location\ABSA-PyTorch-master\data_utils.py", line 114, in init
self.tokenizer = BertTokenizer.from_pretrained(pretrained_bert_name)
File "E:\anaconda\envs\pytorch\lib\site-packages\transformers\tokenization_utils_base.py", line 1629, in from_pretrained
local_files_only=local_files_only,
File "E:\anaconda\envs\pytorch\lib\site-packages\transformers\file_utils.py", line 955, in cached_path
local_files_only=local_files_only,
File "E:\anaconda\envs\pytorch\lib\site-packages\transformers\file_utils.py", line 1125, in get_from_cache
"Connection error, and we cannot find the requested files in the cached path."
ValueError: Connection error, and we cannot find the requested files in the cached path. Please try again or make sure your Internet connection is on.”
请问您有什么好的解决方法吗?