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

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.

can share what’s the error?

1 Like

Hi @Sanket1159. With the new release of Rasa, passing policy parameters like validation_split of epochs is not supported anymore. To solve the problem, you can pass the parameters to policies directly, for example:

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