从文档中运行 rasa_core 示例
› python3 -m rasa_core.run -d models/dialogue -u models/nlu/default/current
并在对话框中的每条消息后获取此错误输出:
.../sklearn/...: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use `array.size > 0` to check that an array is not empty.
这是已修复但未在最新版本中发布的 numpy 问题:https ://github.com/scikit-learn/scikit-learn/issues/10449
以下内容无法暂时使警告静音:
- 添加
-W ignore
python3 -W ignore -m rasa_core.run -d models/dialogue -u models/nlu/default/current
warnings.simplefilter
python3
>>> warnings.simplefilter('ignore', DeprecationWarning)
>>> exit()
python3 -m rasa_core.run -d models/dialogue -u models/nlu/default/current