Warning: This document is for an old version of Rasa Platform. The latest version is 0.18.0.

Training NLU Models Locally

Train Locally from a Rasa Platform Instance

If you would like to test test out a new NLU model, or just tweak some training parameters on your local machine, you have the option to retrieve the data straight from the running Rasa Platform instance. This lets you avoid having multiple copies of the same dataset which are difficult to keep in sync.

How do I do that?

The training process is similar to the one outlined in the Rasa NLU docs on training. Here, instead of specifying a local path to the training data with --data, you can use the data URL of your Rasa Platform instance with the --url parameter. Under the hood, Rasa NLU logs into the Rasa Platform, fetches the training data, temporarily saves it to a local file, and uses that for training.

If your Rasa Platform runs under https://platform-example.com, the URL you’re going to use is https://platform-example.com/api/default/data.json?api_token=<TOKEN>. Replace <TOKEN> with your personal API token. You can find your API token in the Platform under Settings. Have a look at the example below:

$ python -m rasa_nlu.train \
    --config sample_configs/config_spacy.yml \
    --url https://platform-example.com/api/default/data.json?api_token=<TOKEN> \
    --path projects

Note

If you want to reproduce the Platform results, copy the config from the Settings page, save it to a .yml file and use that with the --config option.