songyouwei / ABSA-PyTorch

Aspect Based Sentiment Analysis, PyTorch Implementations. 基于方面的情感分析,使用PyTorch实现。
MIT License
1.99k stars 522 forks source link

关于按照readme.txt中的运行语句进行运行后,出现ValueError的错误 #226

Open nnxiaxia opened 2 months ago

nnxiaxia commented 2 months ago

您好,我在搭建好环境后,按照您的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.” 请问您有什么好的解决方法吗?