RASA chatbot rasa.core.policies.ensemble.InvalidPolicyConfig: Module for policy ‘MemoizationPolicy’ could not be loaded

白昼怎懂夜的黑 提交于 2020-02-06 08:24:02

问题


I’ve got this error, just following the « Getting Started with Rasa » tutorial

So I’ve typed:

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

I’ve got a lot of errors among them:

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


回答1:


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 

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

pip install rasa

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

if you want CPU support only otherwise,

pip install tensorflow==1.15.0

This worked for me.




回答2:


In fact, it was a dependencies nightmare.

So what I’ve done to get a rasa chatbot up and running:

  1. Reinstall dask (but I’m not sure this step is mandatory)

sudo pip3 install "dask[complete]"

  1. Downgraded my version of pandas

sudo pip3 install pandas==0.19.2

  1. Upgraded tqdm

sudo pip3 install -U tqdm

  1. Upgraded OpenAI gym

sudo pip3 install -U gym

Et voilà!



来源:https://stackoverflow.com/questions/59257759/rasa-chatbot-rasa-core-policies-ensemble-invalidpolicyconfig-module-for-policy

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!