AWS sagemaker documentation change
Summary
Replaced estimator references with ModelTrainer and added SageMaker Python SDK v3 code example for XGBoost Report rule.
Security assessment
The changes update terminology and add new SDK code samples. No security configurations, vulnerability mitigations, or security features are introduced.
Diff
diff --git a/sagemaker/latest/dg/debugger-training-xgboost-report-estimator.md b/sagemaker/latest/dg/debugger-training-xgboost-report-estimator.md index 161cb75b6..ac388fcea 100644 --- a//sagemaker/latest/dg/debugger-training-xgboost-report-estimator.md +++ b//sagemaker/latest/dg/debugger-training-xgboost-report-estimator.md @@ -7 +7 @@ -# Construct a SageMaker AI XGBoost estimator with the Debugger XGBoost Report rule +# Construct a SageMaker AI XGBoost ModelTrainer with the Debugger XGBoost Report rule @@ -26 +26 @@ The output tensors are saved at a default S3 bucket. For example, `s3://sagemake -When you construct a SageMaker AI estimator for an XGBoost training job, specify the rule as shown in the following example code. +When you construct a SageMaker AI ModelTrainer for an XGBoost training job, specify the rule as shown in the following example code. @@ -28 +28,31 @@ When you construct a SageMaker AI estimator for an XGBoost training job, specify -Using the SageMaker AI generic estimator +SageMaker Python SDK v3 + + + + import boto3 + import sagemaker + from sagemaker.train import ModelTrainer + from sagemaker import image_uris + from sagemaker.debugger import Rule, rule_configs + + rules=[ + Rule.sagemaker(rule_configs.create_xgboost_report()) + ] + + region = boto3.Session().region_name + xgboost_container=sagemaker.image_uris.retrieve("xgboost", region, "1.2-1") + + model_trainer=ModelTrainer( + role=sagemaker.get_execution_role() + image_uri=xgboost_container, + base_job_name="debugger-xgboost-report-demo", + instance_count=1, + instance_type="ml.m5.2xlarge", + + # Add the Debugger XGBoost report rule + rules=rules + ) + + model_trainer.train() + +SageMaker Python SDK v2 (Legacy)