Training nlu without restarting

How can one train the NLU in real-time / live without having to restart the NLU server?

So far I’m training the NLU using the following command: python -m rasa_nlu.train -c ./nlu_config.yml --data ./data/nlu_data -o models/nlu --fixed_model_name nlu --project current --verbose

In the nlu_data directory I have a few training files in .md and .json format.

As I’m testing the bot, I often run into bad intent identification / ner extraction issues, which I’m trying to solve by adding more samples to the training data. However, it seems like I always have to restart the NLU server to reflect the new model.

Since the new model is saved under the same name (due to --fixed_model_name), I thought it may be possible to autoreload the model while the NLU server is running.

I know there’s online / interactive training available for Rasa Core, but I’m interested in quickly testing and updating the NLU model by training it on a new batch of samples.

Any ideas or solutions? Feel like this should be fairly simple to achieve, but can’t figure it out.

Thanks a lot already!

1 Like

Did you find a solution to this issue ? I wanted to ask the exact same question but since you already ask, I’ll not create a new topic.

If anyone has a solution for this, it would be gladly welcome.

1 Like

It looks like to me that if you train a new model with the same name, it’ll be use by the core without having to restart either the NLU or the core

Did you test that? I think that’s what I tried initially, but it seemed to keep using the model that’s loaded into memory and I had to restart to reload the model from disk.

But maybe I was wrong or messed something up back then.

Yes I did, I try saying a specific sentence, the bot doesn’t understand it, I reload a new model and then the bot understand the sentence.

We are currently using rasa-ui and we are often training the model without restarting the NLU

1 Like

Awesome thanks for testing!

But as I said here : Train NLU server without restarting , we have a bug when you send a message during the saving of the new model