“RobertaTokenizerFast”对象在将数据加载到自定义 NER 模型时没有属性“_in_target_context_manager”错误

问题描述 投票:0回答:1

我正在尝试使用 spacy 将数据加载到自定义 NER 模型中,但出现错误:-

'RobertaTokenizerFast' object has no attribute '_in_target_context_manager'

然而,它适用于其他型号。

感谢您的宝贵时间!

python spacy named-entity-recognition
1个回答
0
投票

将我的环境从 {Python 3.9 + Spacy 3.3} 升级到 {Python 3.10 + Space 3.5} 后,我遇到了同样的问题。通过升级和重新打包模型解决了这个问题。

© www.soinside.com 2019 - 2024. All rights reserved.