本文介绍了RASA chatbot rasa.core.policies.ensemble.InvalidPolicyConfig:无法加载策略"MemoizationPolicy"的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在遵循«开始于Rasa»教程

所以我输入了:

sudo pip3 install rasa-x --extra-index-url https://pypi.rasa.com/simple

这似乎工作正常,但是当我键入以下内容后:

which seems to work fine but when I’ve typed:

sudo rasa init

我当中有很多错误:

rasa.core.policies.ensemble.InvalidPolicyConfig: Module for policy ‘MemoizationPolicy’ could not be loaded. Please make sure the name is a valid policy.

推荐答案

当我尝试使用-rasa init时,我遇到了同样的问题.通过注意两件事可以解决此问题.当您尝试使用-pip安装rasa时,请在虚拟环境中安装rasa.这个安装了最新的python版本,在我的情况下是3.8,但是问题是TensorFlow支持3.8不可用,所以我建议-

I faced the same problem when I tried using - rasa init. This is solved by paying attention to 2 things. When you try to install rasa using - pip install rasa in a virtual environment. This install latest python version, in my case this was 3.8, but the problem was that TensorFlow support was not available for 3.8, So I will suggest-

 conda create --name rasa python=3.6 

对于anaconda或您也可以创建一个虚拟环境.现在使用

For anaconda or you could also create a virtual environment. Now use

pip install rasa

现在,您会注意到将安装TensorFlow == 1.15.1.为了使rasa正常工作,我们需要TensorFlow == 1.15.0

Now you will notice TensorFlow==1.15.1 will be installed. For rasa to work we will need TensorFlow==1.15.0

pip uninstall tensorflow
pip install tensorflow-cpu==1.15.0

如果您仅想获得CPU支持,

if you want CPU support only otherwise,

pip install tensorflow==1.15.0

这对我有用.

这篇关于RASA chatbot rasa.core.policies.ensemble.InvalidPolicyConfig:无法加载策略"MemoizationPolicy"的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 01:29