Skip to content

Commit c32de01

Browse files
author
Kim
committed
Fix title format error; Add predict() example
1 parent 973d822 commit c32de01

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/frameworks/xgboost/using_xgboost.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ For information about how to write an inference script, see `SageMaker XGBoost M
415415
Pass the filename of the inference script as the ``entry_point`` parameter when you create the `XGBoostModel` object.
416416

417417
Create an XGBoostModel Object
418-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
418+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
419419

420420
To create a model object, call the ``sagemaker.xgboost.model.XGBoostModel`` constructor,
421421
and then call its ``deploy()`` method to deploy your model for inference.
@@ -434,6 +434,10 @@ and then call its ``deploy()`` method to deploy your model for inference.
434434
initial_instance_count=1
435435
)
436436
437+
# If payload is a string in LIBSVM format, we need to change serializer.
438+
predictor.serializer = str
439+
predictor.predict("<label> <index1>:<value1> <index2>:<value2>")
440+
437441
To get predictions from your deployed model, you can call the ``predict()`` method.
438442

439443
Host Multiple Models with Multi-Model Endpoints

0 commit comments

Comments
 (0)