Understanding train_online.py

I followed @Juste weatherbot tutorial and applying the knowledge for my own project.

And I am not sure I understand how train_online.py actually works.

When I type hi, the intent should be ‘greet’ but train_online shows the intent is hi. Attached screenshot below

Why is that? When I actually run the bot using dialogue_management_model.py, this works fine as it recognizes the intent and replies with proper utterance.

Why is this difference? What am I missing?

it looks like Rasa Core isn’t able to find your Rasa NLU model to start, that’s why it’s just taking the input as if it was the intent and entities directly. What command are you using to run? just python train_online.py ?

if __name__ == '__main__':
    logging.basicConfig(level="INFO")
    nlu_interpreter = RasaNLUInterpreter('./models/nlu/default/renewalnlu')
    run_renewal_online(ConsoleInputChannel(), nlu_interpreter)

Thats strange. I have specified the NLU path properly.

Yes just sudo python train_online.py

@amn41 any thoughts on how to resolve it? It is impossible to debug without train_online working and I have other issues.

I am using Rasa NLU 0.12.3 and Rasa Core version 0.9.8. Below train_online code

def run_renewal_online(input_channel, interpreter,
                          domain_file="renewal_domain.yml",
                          training_data_file='data/stories.md'):
    #agent = Agent(domain_file,policies=[MemoizationPolicy(), KerasPolicy()],interpreter=interpreter)
    agent = Agent(domain_file, policies=[AugmentedMemoizationPolicy(max_history=3), KerasPolicy()])
    data = agent.load_data(training_data_file)
    agent.train_online(data,
                       input_channel=input_channel,
                       max_history=2,
                       batch_size=50,
                       epochs=200,
                       max_training_samples=300)

    return agent


if __name__ == '__main__':
    logging.basicConfig(level="INFO")
    nlu_interpreter = RasaNLUInterpreter('./models/nlu/default/renewalnlu')
    run_renewal_online(ConsoleInputChannel(), nlu_interpreter)

nevermind, found the issue. In the updated agent object, I didn’t include NLUInterpreter object.

glad to hear you found the issue!