Operate
The goal is to ensure that the serving is reliable, stable, and manageable. This is achieved by monitoring the service against target KPIs.
In practice, the pipeline service logs:
- HTTP middleware (
api.py): logsrequest_completedonly for requests with status code>=400or duration aboveSLOW_REQUEST_MS(default50ms). - Prediction route (
router/classifier.py): logs successfulprediction_completedsummaries atDEBUG, and warnings for invalid images ortop_k.
Set verbosity with LOG_LEVEL (default INFO). Example: export LOG_LEVEL=DEBUG. Set the slow-request threshold with SLOW_REQUEST_MS. Terminal log colors use LOG_COLOR=auto by default; set LOG_COLOR=true or LOG_COLOR=false to override.