Loading topic
model.joblib file that the service can load late6 min readIrisFeatures model from the previous chapter and can run a FastAPI app with Uvicorn. You should know basic Python type hints. No Pydantic experience beyond the earlier example is needed.5 min readmodel.joblib file from the previous chapter. It covers where a model should be loaded in a web service, why, and what goes wrong when it is loaded in the wrong place.5 min readPOST /predict endpoint. It traces one request from the network to the model and back, and it covers the details that commonly go wrong.5 min readmain.py that loads model.joblib in a lifespan function, a /predict endpoint, and a models dictionary. You should also know what an HTTP status code is. By the end, the service will report whether it i6 min readpytest output, and that you have the main.py service and model.joblib file from the previous chapters in your working directory. You also need pytest and httpx 5 min read/predict endpoint from the earlier chapters. It also assumes you can read a FastAPI route with Pydantic models and know what a scikit-learn predict call returns. The chapter adds an endpoint that scores many rows per request and explains when that helps and when6 min readmain.py that loads the model in lifespan and serves /predict. It also assumes you know basic Python async/await syntax. You will learn why one slow prediction can freeze an entire service, and how to prevent it.5 min read/predict endpoint, a /predict/batch endpoint, and a /health endpoint. You should also know what an HTTP header and a status code are. Here you will add API-key authentication, rate limiting, and input size limits. Y5 min readmodel.joblib, a typed /predict endpoint, a model loaded at startup, tests, a Docker image, and a basic idea of batching, concurrency, and replicas. The goal here is to decide when that hand-writ6 min read