Hello, i’m trying to simply train a model from a custom UI that I made
When I click on the button I call the function /create_model on the back end that will call the /train on a custom docker image rasa_nlu_fr like this :
var project_name = "project_name"
var model_name = "model_name"
var options = {
url: 'http://localhost:5000/train?project='+project_name+'&model='+model_name,
method: 'POST',
headers: { 'content-type': 'application/x-yml' },
body: fs.readFileSync('./rasa/nlu_config.yml','utf8'),
encoding: null
};
request(options, (error, response, body) => {
if (!error && response.statusCode == 200) {
console.log("ok!")
resp.json({ "text": "model "+model_name+", on projet "+project_name+", created."})
}
else
console.log("problem.")
});
I created a custom image of rasa_nlu to add french corpus like this :
FROM rasa/rasa_nlu:stable-full
RUN pip install https://github.com/explosion/spacy-models/releases/download/fr_core_news_md-2.0.0/fr_core_news_md-2.0.0.tar.gz --no-cache-dir > /dev/null \
&& python -m spacy link fr_core_news_md fr
VOLUME ["/app/projects", "/app/logs", "/app/data"]
EXPOSE 5000
ENTRYPOINT ["./entrypoint.sh"]
CMD ["start", "-c", "config.yml", "--path", "/app/projects"]
The problem is that when I click the button once it creates the model correctly no error no problem, but when I do it more than one I’m getting this:
r.merabtene@gop.link@LGOP2613:~/SG/socle_nlp/IHM/adminLTE/with_react/with_express/rasa$ sudo docker-compose up
Creating rasa_rasa_1 ... done
Creating rasa_duckling_1 ... done
Attaching to rasa_duckling_1, rasa_rasa_1
duckling_1 | no port specified, defaulting to port 8000
duckling_1 | Listening on http://0.0.0.0:8000
rasa_1 | 2019-05-23 08:36:02+0000 [-] Log opened.
rasa_1 | 2019-05-23 08:36:02+0000 [-] Site starting on 5000
rasa_1 | 2019-05-23 08:36:02+0000 [-] Starting factory <twisted.web.server.Site object at 0x7fcd0a3b2940>
rasa_1 | 2019-05-23 08:37:49+0000 [-] "172.23.0.1" - - [23/May/2019:08:37:49 +0000] "POST /train?project=project_name&model=model_name HTTP/1.1" 200 34260 "-" "-"
rasa_1 | 2019-05-23 08:38:51+0000 [-] 2019-05-23 08:38:51 WARNING rasa_nlu.data_router - [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.defer.CancelledError'>:
rasa_1 | 2019-05-23 08:38:51+0000 [-] ]
I have stop the container completely with : sudo docker stop $(sudo docker ps -a -q) sudo docker rm $(sudo docker ps -a -q) sudo docker system prune
So that it starts again to work If anyone knows whats happening, thanks in advance for your help !
- System : Ubuntu 18.4.2, 16gb of RAM
- UI: React
- Back-end : Node-js - express-js
- Rasa via docker : 0.15.0