Facing issues while training the Rasa Core Dialogue Module in Jupyter Notebook

(Sanket Patnaik) #1

Hi, I am relatively new to using the Rasa framework. I have trained the Rasa NLU module without any issues. When I train the Rasa Core Dialogue module, I get an error message. I have tried changing the values of threshold for core and nlu, nonetheless it has no effect. I am essentially doing the entire thing on a Jupyter Notebook which shall be later deployed in Azure environment.

Snippet of the code and error message below:

from rasa_core.policies import FallbackPolicy, KerasPolicy, MemoizationPolicy from rasa_core.agent import Agent

fallback = FallbackPolicy(fallback_action_name=“utter_unclear”, core_threshold=0.2, nlu_threshold=0.1)

agent = Agent(‘domain.yml’, policies=[MemoizationPolicy(), KerasPolicy(), fallback])

training_data = agent.load_data(‘stories.md’)

agent.train(training_data,validation_split=0.0,epochs=200) # got error on this line

agent.persist(‘models/dialogue’) .-------------------------------------------------------------------------------------------------------------- Exception : Passing policy configuration parameters to agent.train(...) is not supported anymore. Specify parameters directly in the policy configuration instead. More info http://legacy-docs.rasa.com/core/migrations.html

moved epoch = 200 as parameter to Keras Policy and ran the code got error as “coroutine object is not iterable” - on the same agent.train line

Any suggestions for replacing agent.train or how to train the dialog module in the notebook.

(JG) #2

can share what’s the error?