Hi ,
I am trying to do below code but facing an error while execution.
Not able to fix it. Please help
Code -
import asyncio
fallback = FallbackPolicy(fallback_action_name=“utter_unclear”, core_threshold=0.2, nlu_threshold=0.5)
agent = Agent(‘domain_ad.yml’, policies=[MemoizationPolicy(max_history=2), KerasPolicy(epochs=500, batch_size=10)])
loading our neatly defined training dialogues
training_data = agent.load_data(‘stories_ad.md’)
loop = asyncio.get_event_loop()
loop.stop()
loop.close()
training_data = loop.run_until_complete(agent.load_data(‘stories_ad.md’)) agent.train(training_data)
loop.close()
agent.train( training_data, validation_split=0.0 )
agent.persist(‘models/nlu/helpdesk’)
Issue-
RuntimeError: This event loop is already running
Processed Story Blocks: 100%|█████████████████████████████████████████████| 8/8 [00:00<00:00, 640.95it/s, # trackers=1] Processed Story Blocks: 100%|█████████████████████████████████████████████| 8/8 [00:00<00:00, 617.07it/s, # trackers=8] Processed Story Blocks: 100%|████████████████████████████████████████████| 8/8 [00:00<00:00, 135.93it/s, # trackers=50] Processed Story Blocks: 100%|████████████████████████████████████████████| 8/8 [00:00<00:00, 138.29it/s, # trackers=50]
Can Anyone tell me why this is coming and what i have to do stop it ?
Because of this issue my model is not getting saved in the model directory.
RASA version -1.7.0