python - ImportError:无法为 RASA 交互式学习导入名称“style_from_dict”。提示工具包版本不兼容
问题描述
我正在尝试使用 Jupyter notebook 在 Rasa Core 中使用交互式学习来训练对话流程。
代码片段:
### interactive learning
import logging
from rasa_core import utils, train
from rasa_core.training import interactive
logger = logging.getLogger(__name__)
def train_agent():
return train.train_dialogue_model(domain_file="domain.yml",
stories_file="data/stories.md",
output_path="models/dialogue",
policy_config='policy_config.yml'
)
if __name__ == '__main__':
utils.configure_colored_logging(loglevel="INFO")
agent = train_agent()
logger.info("This example does not include NLU data."
"Please specify the desired intent with a preceding '/', e.g."
"'/greet' .")
interactive.run_interactive_learning(agent)
最初我得到:
“找不到令牌错误”指向“从 prompt_toolkit.token 导入令牌”
我降级prompt_toolkit==1.0.14
并尝试运行代码。
得到:
ImportError:无法导入名称'style_from_dict'
我觉得prompt_toolkit
inrasa-core
和ipython
. 目前使用rasa-core==0.12.3
和ipython==7.2.0
。
我需要降级IPython
吗?请建议。
解决方案
降级到 ipython 6.0.0 后,错误得到解决。
推荐阅读
- c# - 使用 get-content 编辑 web.config 并在 powershell 中替换
- regex - 正则表达式不匹配多行字符串
- python - 如何在 python 中多处理 async/await 函数?
- node.js - 尝试在 Nodejs 和 MongoDB 中获取当前登录的用户任务
- sql-server - SSRS 订阅卡在运行状态
- sql - 优化或重用sqlite中的子查询来过滤结果
- android - `pagingAdapter.submitData()` 之后的代码没有被执行
- php - 在 laravel 中创建多个临时表
- amazon-web-services - 私有子网中的 EKS 集群 - Kubernetes 集群中的不健康节点
- javascript - componentDidMount 函数中的 setinterval 是否每次运行都会创建一个新线程?