A typed contract
What a signature is
A signature is a typed contract between the model and its callers. It records the input columns and types (and optional output schema) at logging time, then enforces them when the model is loaded for prediction. The result: a meaningful error message before a malformed payload reaches the model code.
Three benefits:
- Documentation — the model UI shows the expected shape.
- Validation — a wrong dtype or missing column fails loudly.
- Auto-generated request examples —
mlflow models servereturns a samplecurl.
Always pair signature with input_example: the example is what tooling shows in the UI and what tests can replay.