References · Module 10¶
-
FastAPI documentation. fastapi.tiangolo.com Start with Tutorial – User Guide for request bodies, response models, and status codes, then Advanced – Lifespan Events for the start-up hook used here.
-
FastAPI: testing. fastapi.tiangolo.com/tutorial/testing/
TestClientand why the context manager matters for lifespan. The reference tests rely on exactly this behaviour. -
Starlette: lifespan. starlette.io/lifespan/ FastAPI's lifespan is Starlette's. Short and precise, including the state dictionary pattern used in the reference service.
-
pydantic documentation: fields and validators. docs.pydantic.dev/latest/concepts/fields/ · docs.pydantic.dev/latest/concepts/validators/
Field(gt=..., le=...),Literal,field_validator, andextra="forbid". The error structure in this module is pydantic's, surfaced by FastAPI. -
RFC 9110: HTTP Semantics. rfc-editor.org/rfc/rfc9110.html The authoritative definitions of 4xx, 5xx, idempotency, and safe methods. Read §15 for status codes; it settles most arguments about 400 versus 422.
-
MDN: 422 Unprocessable Content. developer.mozilla.org/en-US/docs/Web/HTTP/Status/422 A short, practical description and the note that WebDAV introduced it; useful when a reviewer asks why not 400.
-
Uvicorn documentation: deployment. www.uvicorn.org/deployment/ Workers, process managers, and why
--reloadis a development flag. The bridge to Module 11. -
OpenAPI Specification 3.1. spec.openapis.org/oas/v3.1.0.html What
/openapi.jsonactually contains. Skim the schema object; it explains which constraints appear in/docsand which do not. -
Sculley, D. et al. (2015). Hidden Technical Debt in Machine Learning Systems. papers.nips.cc/paper/5656-hidden-technical-debt-in-machine-learning-systems The "train/serve skew" and "configuration debt" sections are the canonical statement of the problem this module's equivalence test addresses.
-
Breck, E. et al. (2019). Data Validation for Machine Learning. MLSys. mlsys.org/Conferences/2019/doc/2019/167.pdf Why schema checks catch structure and miss semantics, with production examples. Read alongside Concepts §9.
-
Google SRE Book: Monitoring Distributed Systems. sre.google/sre-book/monitoring-distributed-systems/ The four golden signals, including latency percentiles. The reason this module reports p50/p95/p99 rather than a mean.
Note on the numbers¶
Latency (p50 9.55 ms, p95 10.27 ms, p99 30.60 ms) was measured with httpx over 200 sequential requests against a local Uvicorn process on one machine, after a warm-up request. Cold start (2.96 s) was measured from process launch to the first {"ready":true}. Predictions (43.00, 22.64, 21.13 minutes) come from registry version 2 and the course dataset. All of these are local measurements, not service-level guarantees.