Model Interface & Signature Contract¶
Why model contracts matter¶
Serving systems require stable and explicit interfaces. Implicit assumptions lead to runtime failures.
Input contract¶
Each model defines: - input feature names, - data types, - required vs optional fields.
The input schema is enforced via: - MLflow model signature, - Pydantic schemas in the API.
Output contract¶
Outputs include: - prediction values, - optional confidence or probability scores, - metadata where applicable.
Versioning¶
A model contract is versioned together with: - the model artifact, - feature definitions, - training configuration.
Breaking changes require a new model version.