How can i reload the change of DL Models on Fastapi?
See original GitHub issueFirst Check
- I added a very descriptive title to this issue.
- I used the GitHub search to find a similar issue and didn’t find it.
- I searched the FastAPI documentation, with the integrated search.
- I already searched in Google “How to X in FastAPI” and didn’t find any information.
- I already read and followed all the tutorial in the docs and didn’t find an answer.
- I already checked if it is not related to FastAPI but to Pydantic.
- I already checked if it is not related to FastAPI but to Swagger UI.
- I already checked if it is not related to FastAPI but to ReDoc.
Commit to Help
- I commit to help with one of those options 👆
Example Code
no code example
Description
When i change the files of models the models files does not seem to be reloaded and the old ones seems to be used , so how can i make the change in models appear automatically also i dont want to reload the whole app using reload=True is there a way to do this ?
Operating System
Linux
Operating System Details
No response
FastAPI Version
0.70.0
Python Version
3.7
Additional Context
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
How to reload FastAPI app when a file, other than *.py files ...
I want my FastAPI app to reload when a .csv file in the same directory changes. I tried the following command, but it...
Read more >How you can quickly deploy your ML models with FastAPI
We can run the FastAPI app using the following command. uvicorn main:app --reload. The command starts a local Uvicorn server and you should...
Read more >Body - Updates - FastAPI
Create a copy of the stored model, updating it's attributes with the received partial updates (using the update parameter). Convert the copied model...
Read more >Deploying ML Models as API using FastAPI - GeeksforGeeks
Python3 · basic-app refers to the name of the file we created our API in. · app refers to the FastAPI instance we...
Read more >Machine Learning Model Deployment Using FastAPI - YouTube
In this video, we focus on deploying our model as API using the FastAPI library. This way, the solution can be consumed via...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can create asyncio task on startup (and cancel it on shutdown) which checks files hashsum and sleeps for some time, if hashsum has been changed you reload your model into memory.
@insomnes thanks for your help really, i did that and woks fine now