Alibaba-NLP / CLNER

[ACL-IJCNLP 2021] Improving Named Entity Recognition by External Context Retrieving and Cooperative Learning
Other
91 stars 15 forks source link

Can't load config for 'xlm-roberta-large' #18

Open zixinkai opened 1 year ago

zixinkai commented 1 year ago

what's matter please

Traceback (most recent call last): File "train.py", line 90, in student=config.create_student(nocrf=args.nocrf)#调用 config 的 create_student 方法来创建一个学生模型,指定是否启用 CRF File "/root/flair/config_parser.py", line 234, in create_student return self.create_model(self.config,pretrained=self.load_pretrained(self.config), is_student=True) File "/root/flair/config_parser.py", line 187, in create_model embeddings, word_map, char_map, lemma_map, postag_map=self.create_embeddings(config['embeddings']) File "/root/flair/config_parser.py", line 162, in create_embeddings embedding_list.append(getattr(Embeddings,embedding.split('-')[0])(embeddings[embedding])) File "/root/flair/embeddings.py", line 2931, in init self.tokenizer = AutoTokenizer.from_pretrained(model, kwargs) File "/opt/anaconda3/envs/pytorch/lib/python3.7/site-packages/transformers/tokenization_auto.py", line 206, in from_pretrained config = AutoConfig.from_pretrained(pretrained_model_name_or_path, kwargs) File "/opt/anaconda3/envs/pytorch/lib/python3.7/site-packages/transformers/configuration_auto.py", line 203, in from_pretrained configdict, = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, kwargs) File "/opt/anaconda3/envs/pytorch/lib/python3.7/site-packages/transformers/configuration_utils.py", line 251, in get_config_dict raise EnvironmentError(msg) OSError: Can't load config for 'xlm-roberta-large'. Make sure that:

zixinkai commented 1 year ago

请问哪段代码体现了上下文检索和re-rank

zixinkai commented 1 year ago

请问缺少en_retrieval.txt文件吧,bert_scoring.py文件再哪里使用的呀