python - rasa_nlu.model.UnsupportedModelError:模型版本太旧,无法由此 Rasa NLU 实例加载
问题描述
我正在使用 rasa 构建一个聊天机器人。文件中train_online.py
有错误。
我移至最新版本的 rasa_nlu==0.15.1 但仍然收到错误消息。
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
from rasa_core import utils, train
from rasa_core.training import online
from rasa_core.interpreter import NaturalLanguageInterpreter
logger = logging.getLogger(__name__)
def train_agent(interpreter):
return train.train_dialog_model(domain_file="horoscope_domain.yml",
stories_file="data/stories.md",
output_path="models/dialog",
nlu_model_path=interpreter,
endpoints="endpoints.yml",
max_history=2,
kwargs={"batch_size": 50,
"epochs": 200,
"max_training_samples": 300
})
if __name__ == '__main__':
utils.configure_colored_logging(loglevel="DEBUG")
nlu_model_path = "/home/zain/models/dialogue"
interpreter = NaturalLanguageInterpreter.create(nlu_model_path)
agent = train_agent(interpreter)
online.serve_agent(agent)
这是错误
"".format(model_version, rasa_nlu.version )) rasa_nlu.model.UnsupportedModelError:模型版本太旧,无法由这个 Rasa NLU 实例加载。重新训练模型,或使用旧版本运行。模型版本:0.0.0 实例版本:0.15.0
解决方案
推荐阅读
- javascript - 如何不使用多个 Vue 的实例
- c# - 如何在没有 ReSharper 的情况下使用类似 ReSharper 的语法突出显示
- oracle11g - 在 oracle 数据库 xe 11.2 中删除 APEX 表和一些虚拟数据是否安全
- python - 我想对字典进行排序,键为月-年
- function - 离子 4 | 函数中的 Http 给出未定义的数据
- buildfire - Build fire sdk 不工作
- r - 在 R Shiny 中创建一个带有复选框的网格
- javascript - Ajax 中的 if/else 语句简写
- android - 奇怪的问题-Redmi note4-无法通过adb识别
- list - AttributeError:“列表”对象没有属性“值”