AWS sagemaker documentation change
Summary
Removed legacy SageMaker Python SDK v2 code examples for IAM role setup, model training, and incremental training workflows.
Security assessment
Documentation cleanup of deprecated SDK examples without security context. IAM references are standard practice, not security fixes.
Diff
diff --git a/sagemaker/latest/dg/incremental-training.md b/sagemaker/latest/dg/incremental-training.md index a98a23eaf..40fe454ba 100644 --- a//sagemaker/latest/dg/incremental-training.md +++ b//sagemaker/latest/dg/incremental-training.md @@ -147,3 +146,0 @@ Get an AWS Identity and Access Management (IAM) role that grants required permis -SageMaker Python SDK v3 - - @@ -165,16 +161,0 @@ SageMaker Python SDK v3 -SageMaker Python SDK v2 (Legacy) - - - - import sagemaker - from sagemaker import get_execution_role - - role = get_execution_role() - print(role) - - sess = sagemaker.Session() - - bucket=sess.default_bucket() - print(bucket) - prefix = 'ic-incr-training' - @@ -244,3 +224,0 @@ Create an estimator object and train the first model using the training and vali -SageMaker Python SDK v3 - - @@ -292,26 +269,0 @@ SageMaker Python SDK v3 -SageMaker Python SDK v2 (Legacy) - - - - # Fit the base estimator - s3_output_location = 's3://{}/{}/output'.format(bucket, prefix) - ic = sagemaker.estimator.Estimator(training_image, - role, - instance_count=1, - instance_type='ml.p2.xlarge', - volume_size=50, - max_run=360000, - input_mode='File', - output_path=s3_output_location, - sagemaker_session=sess, - hyperparameters=hyperparams) - - train_data = sagemaker.inputs.TrainingInput(s3train, distribution='FullyReplicated', - content_type='application/x-recordio', s3_data_type='S3Prefix') - validation_data = sagemaker.inputs.TrainingInput(s3validation, distribution='FullyReplicated', - content_type='application/x-recordio', s3_data_type='S3Prefix') - - data_channels = {'train': train_data, 'validation': validation_data} - - ic.fit(inputs=data_channels, logs=True) - @@ -320,3 +271,0 @@ To use the model to incrementally train another model, create a new estimator ob -SageMaker Python SDK v3 - - @@ -342,18 +290,0 @@ SageMaker Python SDK v3 -SageMaker Python SDK v2 (Legacy) - - - - # Given the base estimator, create a new one for incremental training - incr_ic = sagemaker.estimator.Estimator(training_image, - role, - instance_count=1, - instance_type='ml.p2.xlarge', - volume_size=50, - max_run=360000, - input_mode='File', - output_path=s3_output_location, - sagemaker_session=sess, - hyperparameters=hyperparams, - model_uri=ic.model_data) # This parameter will ingest the previous job's model as a new channel - incr_ic.fit(inputs=data_channels, logs=True) -