justyn
(Justyn)
May 17, 2021, 5:19pm
1
Hi
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?
Thanks.
m.vielkind
(Matthew Vielkind)
May 20, 2021, 12:15pm
2
Hi @justyn , what installation of Rasa X are you using?
justyn
(Justyn)
May 21, 2021, 1:53pm
3
Hi @m.vielkind
We’re running Rasa X 0.39.2 and Rasa 2.5.1
Thanks!
justyn
(Justyn)
May 21, 2021, 3:03pm
4
Also sorry should have said, we’re using the docker-compose installation method.
justyn
(Justyn)
June 1, 2021, 9:56pm
5
Anyone have any ideas about performing these actions via scripting/the command line?
Many thanks in advance
justyn
(Justyn)
June 7, 2021, 2:57pm
6
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 = requests.post('https://URL/api/auth', data=json.dumps(data), verify=False)
token = json.loads(r.text)['access_token']
print(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!
justyn
(Justyn)
June 16, 2021, 2:48pm
7
@ Team Rasa, is it possible to get some guidance here please?
Thank you