How to train model, and promote it to active, programmatically in Rasa X


We need to trigger training a new model in Rasa X from a script as part of our automation. This bug seems to imply it’s not possible - is that still the case?

Furthermore, we also need to be able to set the active model via scripting. Is there a way to do this?


Hi @justyn, what installation of Rasa X are you using?

Hi @m.vielkind

We’re running Rasa X 0.39.2 and Rasa 2.5.1


Also sorry should have said, we’re using the docker-compose installation method.

Anyone have any ideas about performing these actions via scripting/the command line?

Many thanks in advance

This is my test so far to trigger new training via Rasa X using the endpoints examined from the web interface, so Rasa X will know about the new model (rather than via rasa command line).

in Python (URL and PASSWORD replaced):

import requests, json
data = { 'username' : 'me', 'password' : '{PASSWORD}' }
r ='https://URL/api/auth', data=json.dumps(data), verify=False)
token = json.loads(r.text)['access_token']

headers = { 'Authorization' : 'Bearer ' + token }
r = requests.get('URL/api/projects/default/models/jobs', headers=headers, verify=False)
j = json.loads(r.text)
print(json.dumps(j, indent=4))

However, I receive this response:

    "version": "0.39.2",
    "status": "failure",
    "message": "Model 'None' not found for project 'default'.",
    "reason": "ModelNotFound",
    "details": {},
    "help": null,
    "code": 404

Hints appreciated!

@ Team Rasa, is it possible to get some guidance here please? Thank you