XGBoost runtime for MLServer

This package provides a MLServer runtime compatible with XGBoost.


You can install the runtime, alongside mlserver, as:

pip install mlserver mlserver-xgboost

For further information on how to use MLServer with XGBoost, you can check out this worked out example.

Content Types

The XGBoost runtime supports a new dmatrix content type, aim to decode V2 Inference payloads into XGBoost’s DMatrix data type. This content type uses a similar set of encoding rules as the NumPy Array one.

If no content type is specified on either the request payload or the model’s metadata, the XGBoost runtime will default to the dmatrix content type. To avoid this, either send a different content type explicitly, or define the correct one as part of your model’s metadata.