Rasa: retrain same model via http-endpoint

Created on 16 Aug 2017  路  8Comments  路  Source: RasaHQ/rasa

rasa NLU version (e.g. 0.7.3): unreleased-master (0.9.1?)

Used backend / pipeline (mitie, spacy_sklearn, ...): spacy_sklearn

Operating system (windows, osx, ...): osx

Issue:
When I train a model named my_model via the /train http-endpoint it trains and serves the model in the right way. When I retrain the same model again, the training works well but queries to this model still runs against the old version.

first training:

curl -XPOST "http://localhost:5000/train?&server_model_dirs=my_model&name=my_model" -d "@expressions.json"

second training:

curl -XPOST "http://localhost:5000/train?&server_model_dirs=my_model&name=my_model" -d "@other_expressions.json"

after this, queries against the parse endpoint still returns the intent/entities of expressions.json

Our goal is to easily retrain our server without deploying new code/a new model in the code.

Content of configuration file (if used & relevant):


help wanted type

Most helpful comment

@mnannt my 2 cents :)

Retraining on the same model can be a problem for production systems. I used to overwrite my models and then at some point, one of the training didn't work perfectly and I started to see a critical drop in my responses confidence. I had to find where the problem was coming from and retrain the model.

Training new model all the time (with a timestamp) is good because it makes rollbacks easier (and they will happen in production systems). I then fetch the up-to-date model names from DB.

All 8 comments

This was also requested in the comments on #433. #438 isn't entirely dissimilar either.

if I get around to it I'll consolidate all of these into a single issue for http API updates.

@mnannt for the time being I would recommend a version number or training datetime or something similar in the model name such that you aren't loading exactly the same model.

@wrathagom thanks. But because I also need to provide the model-name in the parse-queries, I would also need to change the model-name in all systems that make requests to the nlu with every deploy and unfortunately that's a bit unpractical :-(

sorry, we've put a small wrapper around Rasa to implement features like this.

Maybe if #449 gets pulled it will solve your problem.

@mnannt my 2 cents :)

Retraining on the same model can be a problem for production systems. I used to overwrite my models and then at some point, one of the training didn't work perfectly and I started to see a critical drop in my responses confidence. I had to find where the problem was coming from and retrain the model.

Training new model all the time (with a timestamp) is good because it makes rollbacks easier (and they will happen in production systems). I then fetch the up-to-date model names from DB.

I'd still like to see the functionality of deleting/unloading a model. But that is fully covered by #438

Sure it absolutely makes sense !

Ha, fixed it. Subsequent people coming here will be like, "expensive, what the heck is that crazy person talking about"! :)

That being said I'm also not the original poster.

gonna close this because you can delete models now

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nahidalam picture nahidalam  路  3Comments

anishrav picture anishrav  路  3Comments

lomarceau picture lomarceau  路  3Comments

Jasperty picture Jasperty  路  3Comments

karnigili picture karnigili  路  3Comments