Skip to content

[Task] Add XGBoost Serving Example #136

@bschifferer

Description

@bschifferer

Description

Provide example how to serve XGBoost model with Merlin Systems. The example should reference training with merlin models and continue with the artficats from it (similar as https://github.com/NVIDIA-Merlin/systems/tree/main/examples )

# export the model data to a model repository directory
from merlin.systems.dag.ops.fil import PredictForest

model = ...  # XGBoost, LightGBM, or cuml/sklearn random forest.
input_schema = ...  # merlin Schema representing input features to the model
ops = feature_names >> PredictForest(model, input_schema)
ensemble = Ensemble(ops, input_schema)
ensemble.export(export_path)


# make a request to the ensemble
from merlin.systems.triton.utils import send_triton_request

outputs_list = ensemble.graph.output_schema.column_names
response = send_triton_request(request, outputs_list, endpoint="triton:8001", triton_model="ensemble_model")
response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions