DeepKE icon indicating copy to clipboard operation
DeepKE copied to clipboard

直接使用预训练模型报错

Open mumu0419 opened this issue 4 years ago • 3 comments

Describe the question

A clear and concise description of what the question is. 在学习框架时,RE和Ner的standard模型部分,参考教程直接使用预训练的模型进行预测,均报错Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.;使用自己训练好的模型就不会出问题。

Environment (please complete the following information):

  • OS: [e.g. mac / window]windows10
  • Python Version [e.g. 3.6]3.8 环境配置和推荐的一致

Screenshots

If applicable, add screenshots to help explain your problem.

NER句子: 《星空黑夜传奇》是连载于起点中文网的网络小说,作者是啤酒的罪孽 NER结果: Traceback (most recent call last): File ".\predict.py", line 14, in main result = model.predict(text) File "e:\data_study\nlp\deepke-main\src\deepke\name_entity_re\standard\models\InferBert.py", line 141, in predict tag[wordstype].append(''.join(tmp)) KeyError: 'YAS'

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

Additional context

Add any other context about the problem here.

mumu0419 avatar Jul 04 '22 08:07 mumu0419

你这可能没有用到最新的代码,可以git pull最新代码

tlk1997 avatar Jul 04 '22 10:07 tlk1997

明白了,感谢回复!

mumu0419 avatar Jul 05 '22 01:07 mumu0419

收到,感谢!!!

mumu0419 avatar Oct 11 '22 07:10 mumu0419