Updating model from Rasa X UI

Hey guys,

We are migrating form dialogflow to rasa, since we fell in love with rasa, but we have a small question to better understand how model retraining is performed under the hood by Rasa X when using the user interface(interactive learning). This is our question:

So we are now setting up rasa and rasa x on heroku. Now when we are going to use interactive learning to update our model and we push on the train button, rasa x will output new model files, which we can automatically push to our git repo. But how does rasa retrain the assistant on basis of this new updated model?

Does rasa x under the hood call this training endpoint of the rasa server @app.post("/model/train") ?

And if so, how does rasa x knows the endpoint url of our rasa server setup on heroku, do we have to configure this somewhere in rasa x? This is not only relevant for heroku but also for set-ups where rasa and rasa x are deployed as two different systems.

Or do we have to kick-off a rasa training job in our build phase when a new push is done to the repo that contains the assistant and model files?

When setting up rasa and rasa x, you have to extract the rabbitmq credentials from rasa x and use these in configuring your rasa server. So the rasa server knows where to send the conversations to, for rasa x. But it is not clear for us how it works the other way around, how rasa retrains the model under the hood based on the updated model from rasa x.

In the documentation we could only find a note that you have the push the train button to retrain your assistant based on the new updated model. But we would like to know how this works under the hood, for a better architectural understanding of the rasa platform.

Thanks in advance for your help!

Hi @kasual,

Does rasa x under the hood call this training endpoint of the rasa server @app.post("/model/train") ?

Yep, that’s exactly what’s happening! Good detective work :female_detective::male_detective:

And if so, how does rasa x knows the endpoint url of our rasa server setup on heroku, do we have to configure this somewhere in rasa x? This is not only relevant for heroku but also for set-ups where rasa and rasa x are deployed as two different systems.

This depends a bit on how you set up Rasa X. When you install it from pypi it will always assume an installation on machine so it’s always taking localhost. If you run Rasa X with the provided docker containers (e.g. using Docker-Compose Quick Install), then Rasa X expects a file called environments.yml which e.g. looks like this:

rasa:
  production:
    url: http://rasa-production:5005
    token: ${RASA_TOKEN}
  worker:
    url: http://rasa-worker:5005
    token: ${RASA_TOKEN}

The production and worker keys are fixed, but you can adapt the url and token to your needs. This file has to be mounted to /app/environments.yml in the Rasa X container. These docs are for enterprise only, but maybe they can still help you a bit Deployment Environments .