All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Emit error message when an exception is handled by the built application. Add
X-Request-ID
header value to log message when present
- Adapt to pydantic 2.x API changes
- Assume naive datetimes to be UTC
- Generic error handling passes correct request and exception arguments
- Return an asynchronous function from build_predictor
- Use orjson to serialize responses from app returned by build_app
- Improved error handling in app returned by
build_app
; will catch and format genericExceptions
- Use newer pydantic and fastapi for potential performance improvements
- Support for Python 3.10, 3.11
- mlflow 2.x
- fastapi 0.96.x
- Raise an error for unsupported field types. Previously would silently return a
None
resulting in request time errors. - Support objects for predictions in array-like structures by mapping them to strings
- Improve support for models that return 1d arrays / tensors of strings
- Catch errors when model result does not conform to expected schema, and format as JSON response
- Catch errors raised by ML model's predict method, format them as JSON, and return as the body of the 500 status response.
- Support strings for predictions in array-like structures
- Assume that prediction output field(s) may be nullable. It's not uncommon to want ML models to return null or nan values at inference time (e.g. extrapolation outside of training data range).
- Coerce nan values in output to null in JSON.
- Support for multiple model outputs by handling
PyFuncModel
s that returnpandas.Series
orpandas.DataFrame
- Explicitly cast DataFrame column types before applying model to handle downcast of 32-bit integers.
- Return an object in JSON APIs, rather than arrays of objects. This provides better interoperability with JVM based clients using the popular Jackson object mapper.
- Unpin FastAPI dependency to benefit from future upgrades
- Explicit license and Copyright statement
- Link to repository in package metadata
- Improved documentation in the README for public release
- Typing annotations, checked with mypy
- Basic functionality to build a predictor callable and an app