Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retrain same model via http-endpoint #529

Closed
mattinannt opened this issue Aug 16, 2017 · 8 comments
Closed

retrain same model via http-endpoint #529

mattinannt opened this issue Aug 16, 2017 · 8 comments
Labels
help wanted type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR

Comments

@mattinannt
Copy link

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):

@wrathagom
Copy link
Contributor

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 wrathagom added type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR help wanted labels Aug 16, 2017
@mattinannt
Copy link
Author

@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 :-(

@wrathagom
Copy link
Contributor

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

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

@thaume
Copy link
Contributor

thaume commented Aug 16, 2017

@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.

@wrathagom
Copy link
Contributor

wrathagom commented Aug 16, 2017

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

@thaume
Copy link
Contributor

thaume commented Aug 16, 2017

Sure it absolutely makes sense !

@wrathagom
Copy link
Contributor

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.

@akelad
Copy link
Contributor

akelad commented Mar 27, 2019

gonna close this because you can delete models now

@akelad akelad closed this as completed Mar 27, 2019
taytzehao pushed a commit to taytzehao/rasa that referenced this issue Jul 14, 2023
…asaHQ#529)

fixes RasaHQ#528

Co-authored-by: Hugh Lunt <hugh.lunt@itv.com>

Co-authored-by: Hugh Lunt <hugh.lunt@itv.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted type:enhancement ✨ Additions of new features or changes to existing ones, should be doable in a single PR
Projects
None yet
Development

No branches or pull requests

4 participants