AWS sagemaker documentation change
Summary
Removed SageMaker Python SDK v2 (Legacy) code examples and empty section headers
Security assessment
Removal of deprecated SDK examples doesn't indicate security fixes. No security context provided.
Diff
diff --git a/sagemaker/latest/dg/sagemaker-hyperpod-trainium-sagemaker-training-jobs-pretrain-tutorial.md b/sagemaker/latest/dg/sagemaker-hyperpod-trainium-sagemaker-training-jobs-pretrain-tutorial.md index 81212c703..ba53db4b7 100644 --- a//sagemaker/latest/dg/sagemaker-hyperpod-trainium-sagemaker-training-jobs-pretrain-tutorial.md +++ b//sagemaker/latest/dg/sagemaker-hyperpod-trainium-sagemaker-training-jobs-pretrain-tutorial.md @@ -97,3 +96,0 @@ You can use the following Python code to run a SageMaker training job using your -SageMaker Python SDK v3 - - @@ -150,47 +146,0 @@ SageMaker Python SDK v3 -SageMaker Python SDK v2 (Legacy) - - - - import os - import sagemaker,boto3 - from sagemaker.debugger import TensorBoardOutputConfig - - from sagemaker.pytorch import PyTorch - - sagemaker_session = sagemaker.Session() - role = sagemaker.get_execution_role() - - recipe_overrides = { - "run": { - "results_dir": "/opt/ml/model", - }, - "exp_manager": { - "explicit_log_dir": "/opt/ml/output/tensorboard", - }, - "data": { - "train_dir": "/opt/ml/input/data/train", - }, - "model": { - "model_config": "/opt/ml/input/data/train/config.json", - }, - "compiler_cache_url": "<compiler_cache_url>" - } - - tensorboard_output_config = TensorBoardOutputConfig( - s3_output_path=os.path.join(output, 'tensorboard'), - container_local_output_path=overrides["exp_manager"]["explicit_log_dir"] - ) - - estimator = PyTorch( - output_path=output_path, - base_job_name=f"llama-trn", - role=role, - instance_type="ml.trn1.32xlarge", - sagemaker_session=sagemaker_session, - training_recipe="training/llama/hf_llama3_70b_seq8k_trn1x16_pretrain", - recipe_overrides=recipe_overrides, - ) - - estimator.fit(inputs={"train": "your-inputs"}, wait=True) - -