Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Fix model loading for later versions of XGBoost. #234

Merged
merged 1 commit into from
Oct 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions doc_source/define-pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@ This section shows how to create a processing step to evaluate the accuracy of
with tarfile.open(model_path) as tar:
tar.extractall(path=".")

model = pickle.load(open("xgboost-model", "rb"))
model = xgboost.Booster()
model.load_model("xgboost-model")

test_path = "/opt/ml/processing/test/test.csv"
df = pd.read_csv(test_path, header=None)
Expand Down Expand Up @@ -687,4 +688,4 @@ A step can only appear once in either the pipeline's step list or the if/else st

This pipeline definition is ready to submit to SageMaker\. In the next tutorial, you submit this pipeline to SageMaker and start an execution\.

**Next step:** [Run a pipeline](run-pipeline.md)
**Next step:** [Run a pipeline](run-pipeline.md)