SageMaker XGBoost batch transform AttributeError

0

Hi,

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!

질문됨 2년 전442회 조회
1개 답변
0

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.

References:

[1] https://sagemaker-examples.readthedocs.io/en/latest/aws_sagemaker_studio/sagemaker_studio_image_build/xgboost_bring_your_own/Batch_Transform_BYO_XGB.html

[2] https://github.com/aws/amazon-sagemaker-examples/blob/main/introduction_to_applying_machine_learning/xgboost_customer_churn/xgboost_customer_churn.ipynb

AWS
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인