By using AWS re:Post, you agree to the Terms of Use

SageMaker XGBoost batch transform AttributeError



After training XGBoost model using SageMaker inbuilt algorithm, I am trying to perform batch transform operation. I am doing the same steps as for linear learner model which worked fine there. However in case of XGBoost I get a following error while creating a transformer:

AttributeError: module 'sagemaker' has no attribute 'utils'

The piece of code causing the error is:

xgb_transformer = xgb_estimator.transformer(
    instance_count = 1, 
    instance_type = 'ml.m4.10xlarge',
    output_path = '{}/{}'.format(output_path,'output')

I use '1.5-1' version of XGBoost as image in training, and 2.86.2 version of SageMaker.

Any help would be highly appreciated!

1 Answers

I have tried replicating the issue and by updating the SageMaker Package to the latest version sagemaker-2.99.0 I did not find any issues creating the batch transform job. Requesting you to update the sagemaker package to the latest version and let us know if you continue to face the issue.

!pip3 install -U sagemaker

If you continue to face the issue I would encourage you to open a support ticket with AWS along with the sample code, the training job and the batch transform job ARN. Due to security reason, this post is not suitable for sharing customer's resource.




answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions