问题描述
这个问题是关于 NLP Python 模块 Flair (https://github.com/flairNLP/flair)。
模型的默认下载文件夹位于 flair 缓存 (~/.flair) 中。但是,在服务器上工作时,我更希望此下载发生在另一个位置,因为 /home 目录非常小。这是一个最小的工作示例。
from flair.data import Sentence
from flair.models import SequenceTagger
# make a sentence
sentence = Sentence('I love Berlin .')
# load the NER tagger
tagger = SequenceTagger.load('ner')
因此您可以看到设备上没有剩余空间并出现以下错误:
(...) OSError: [Errno 28] No space left on device: '~/.flair/models/ner-english/tmp8js3y34i' (...)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)