Skip to content

repeated load_model if receiving multiple calls #1

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

Open
yimcai opened this issue Jul 14, 2020 · 1 comment
Open

repeated load_model if receiving multiple calls #1

yimcai opened this issue Jul 14, 2020 · 1 comment

Comments

@yimcai
Copy link

yimcai commented Jul 14, 2020

I am wondering if it would be better to load keras model once, and assign it to a global variable. It seems get_predictions would load keras model every time it gets called.
https://github.com/PyDataBlog/fastapi-model-deployment/blob/master/app/data/predictions_handler.py

@PyDataBlog
Copy link
Owner

@yimcai please feel free to make a PR with your suggestion. Yea, it makes practical sense to load it once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants