Real-time Models (Postgres)
If you are dealing with billions of predictions, this solution might not be sufficient for you.
Dealing with billions of predictions?
If you are dealing with billions of predictions, this solution might not be sufficient for you.
Example: FastAPI + SQLAlchemy
If you are serving models with Flask or FastAPI, and don't have an extremely high throughput, you can simply insert predictions to a standard database.
First, we can define the structure of our database table using Pydantic:
And here is a sample implementation of POST /predict
endpoint:
Last updated