Comments (3)
def train_dialogue(domain_file="mobile_domain2.yml",
model_path="models\dialogue",
training_data_file="data/mobile_story.md"):
featurizer = MaxHistoryTrackerFeaturizer(BinarySingleStateFeaturizer(), max_history=5)
agent = Agent(domain_file, policies=[MemoizationPolicy(max_history=5), KerasPolicy(featurizer)])
agent.train(
training_data_file,
epochs=200,
batch_size=16,
augmentation_factor=50,
validation_split=0.2
)
agent.persist(model_path)
return agent
我参考另一个项目,把这里改成上面那样,训练通过了。建议你试试
from _rasa_chatbot.
我将train-dialogue函数改成这样了,但是还是会出以下的错误:
Exception: Passing a file name to agent.train(...)
is not supported anymore. Rather load the data with data = agent.load_data(file_name)
and pass it to agent.train(data)
.
然后我按照文档改了一下代码
def train_dialogue(domain_file="mobile_domain.yml",
model_path="models/dialogue",
training_data_file="data/mobile_story.md"):
featurizer = MaxHistoryTrackerFeaturizer(BinarySingleStateFeaturizer(), max_history=5)
agent = Agent(domain_file, policies=[MemoizationPolicy(max_history=5), KerasPolicy(featurizer)])
data = agent.load_data(training_data_file)
#agent.train(data)
agent.train(
data,
epochs=200,
batch_size=16,
augmentation_factor=50,
validation_split=0.2
)
agent.persist(model_path)
return agent
还是会报错:
Exception: Can not access action 'action_search_consume', as that name is not a registered action for this domain. Available actions are:
请问怎么解决啊,谢谢!
from _rasa_chatbot.
代码已更新,从新clone试试
from _rasa_chatbot.
Related Issues (20)
- actions没搞上
- 运行这一步时候报错 curl -X POST localhost:1235/parse -d '{"q":"我的流量还剩多少"}' | python -m json.tool请大神帮帮忙看看 HOT 4
- 演示代码 HOT 1
- demo code代码能发邮箱一下么,谢谢! HOT 1
- ERROR:rasa_core.processor:Encountered an exception while running action 'action_affirm_question'. Bot will continue, but the actions events are lost. Make sure to fix the exception in your custom code.
- 你好,有没有试过look up table这个特性,我在中文环境下没有成功过
- how to modify parameter for Part II: train segment classifier
- python bot.py online_train err
- 请问如何生成story?
- 运行python bot.py train-dialogue 报错
- mobile_nlu_model_config.json的配置文件
- 关于运行环境
- TypeError: load() missing 1 required positional argument: 'config'
- The config file 'ivr_chatbot.yml' is missing mandatory parameters: 'policies'. Add missing parameters to config file and try again.
- 老哥,你在慕课网的那份ppt方便提供一下吗?关于讲解这个的,谢谢大佬 HOT 6
- 请问您在视频中说会写rasa里的具体原理可以在哪里获取呢? HOT 2
- 关于MITIE的原始语料 HOT 2
- rasa-core 0.9.0 has requirement scikit-learn~=0.19.0
- 大佬,你的项目是不是少了一些文件? HOT 3
- 老哥,你确定你的代码是依赖于python3? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from _rasa_chatbot.