The artifact is the contract
The deployable thing is not the model. It is the entire pipeline (preprocessing + model) saved as a single artifact. The discipline is to load the artifact in a fresh environment and run predict on a raw row without any extra glue. If that does not work, the pipeline is not really an artifact yet.
What goes inside
- The fitted Pipeline (preprocessing + model).
- The list of expected input column names and dtypes.
- The model version, training timestamp, code commit, dataset hash.
- The chosen threshold (if classification) and the metric value at training time.
Format choices
joblib is the sklearn default. onnx is the cross-language option for serving in non-Python runtimes. For boosting libraries, save in their native format too (model.save_model('booster.json')) so you can inspect splits later without unpickling.