AWS sagemaker documentation change
Summary
Added deprecation notice for SageMaker Profiler (discontinued after 6/30/27), updated configuration instructions, and removed legacy SDK v2 code examples
Security assessment
Changes focus on service deprecation and documentation cleanup. No security vulnerabilities, fixes, or security features are mentioned. Removal of legacy code examples doesn't indicate security issues.
Diff
diff --git a/sagemaker/latest/dg/debugger-configuration-for-profiling.md b/sagemaker/latest/dg/debugger-configuration-for-profiling.md index 8f25453d7..1d24c958e 100644 --- a//sagemaker/latest/dg/debugger-configuration-for-profiling.md +++ b//sagemaker/latest/dg/debugger-configuration-for-profiling.md @@ -10,0 +11,4 @@ Code template for configuring a SageMaker AI estimator object with the SageMaker +###### Note + +On 6/30/27, AWS will discontinue support for Amazon SageMaker Profiler. After 6/30/27, you will no longer be able to access the Profiler console or Profiler resources. For more information, see [Profiler availability change](./profiler-availability-change.html). + @@ -29 +33 @@ To use the latest SageMaker Debugger features, you need to upgrade the SageMaker -To adjust the basic profiling configuration (`profiler_config`) or add the profiler rules (`rules`), choose one of the tabs to get the template for setting up a SageMaker AI estimator. In the subsequent pages, you can find more information about how to configure the two parameters. +To adjust the basic profiling configuration (`profiler_config`) or add the profiler rules (`rules`), use the following template for setting up a SageMaker AI training job. In the subsequent pages, you can find more information about how to configure the two parameters. @@ -35,3 +38,0 @@ The following code examples are not directly executable. Proceed to the next sec -SageMaker Python SDK v3 - - @@ -94,166 +94,0 @@ For MXNet and XGBoost, when configuring the `profiler_config` parameter, you can -SageMaker Python SDK v2 (Legacy) - - -**PyTorch:** - - - # An example of constructing a SageMaker AI PyTorch estimator - import boto3 - import sagemaker - from sagemaker.pytorch import PyTorch - from sagemaker.debugger import ProfilerConfig, ProfilerRule, rule_configs - - session=boto3.session.Session() - region=session.region_name - - profiler_config=ProfilerConfig(...) - rules=[ - ProfilerRule.sagemaker(rule_configs.BuiltInRule()) - ] - - estimator=PyTorch( - entry_point="directory/to/your_training_script.py", - role=sagemaker.get_execution_role(), - base_job_name="debugger-profiling-demo", - instance_count=1, - instance_type="ml.p3.2xlarge", - framework_version="1.12.0", - py_version="py37", - - # SageMaker Debugger parameters - profiler_config=profiler_config, - rules=rules - ) - - estimator.fit(wait=False) - -**TensorFlow:** - - - # An example of constructing a SageMaker AI TensorFlow estimator - import boto3 - import sagemaker - from sagemaker.tensorflow import TensorFlow - from sagemaker.debugger import ProfilerConfig, ProfilerRule, rule_configs - - session=boto3.session.Session() - region=session.region_name - - profiler_config=ProfilerConfig(...) - rules=[ - ProfilerRule.sagemaker(rule_configs.BuiltInRule()) - ] - - estimator=TensorFlow( - entry_point="directory/to/your_training_script.py", - role=sagemaker.get_execution_role(), - base_job_name="debugger-profiling-demo", - instance_count=1, - instance_type="ml.p3.2xlarge", - framework_version="2.8.0", - py_version="py37", - - # SageMaker Debugger parameters - profiler_config=profiler_config, - rules=rules - ) - - estimator.fit(wait=False) - -**MXNet:** - - - # An example of constructing a SageMaker AI MXNet estimator - import sagemaker - from sagemaker.mxnet import MXNet - from sagemaker.debugger import ProfilerConfig, ProfilerRule, rule_configs - - profiler_config=ProfilerConfig(...) - rules=[ - ProfilerRule.sagemaker(rule_configs.BuiltInRule()) - ] - - estimator=MXNet( - entry_point="directory/to/your_training_script.py", - role=sagemaker.get_execution_role(), - base_job_name="debugger-profiling-demo", - instance_count=1, - instance_type="ml.p3.2xlarge", - framework_version="1.7.0", - py_version="py37", - - # SageMaker Debugger parameters - profiler_config=profiler_config, - rules=rules - ) - - estimator.fit(wait=False) - -###### Note - -For MXNet, when configuring the `profiler_config` parameter, you can only configure for system monitoring. Profiling framework metrics is not supported for MXNet. - -**XGBoost:** - - - # An example of constructing a SageMaker AI XGBoost estimator - import sagemaker - from sagemaker.xgboost.estimator import XGBoost - from sagemaker.debugger import ProfilerConfig, ProfilerRule, rule_configs - - profiler_config=ProfilerConfig(...) - rules=[ - ProfilerRule.sagemaker(rule_configs.BuiltInRule()) - ] - - estimator=XGBoost( - entry_point="directory/to/your_training_script.py", - role=sagemaker.get_execution_role(), - base_job_name="debugger-profiling-demo", - instance_count=1, - instance_type="ml.p3.2xlarge", - framework_version="1.5-1", - - # Debugger-specific parameters - profiler_config=profiler_config, - rules=rules - ) - - estimator.fit(wait=False) - -###### Note - -For XGBoost, when configuring the `profiler_config` parameter, you can only configure for system monitoring. Profiling framework metrics is not supported for XGBoost. - -**Generic estimator:** - - - # An example of constructing a SageMaker AI generic estimator using the XGBoost algorithm base image - import boto3 - import sagemaker - from sagemaker.estimator import Estimator - from sagemaker import image_uris - from sagemaker.debugger import ProfilerConfig, DebuggerHookConfig, Rule, ProfilerRule, rule_configs - - profiler_config=ProfilerConfig(...) - rules=[ - ProfilerRule.sagemaker(rule_configs.BuiltInRule()) - ] - - region=boto3.Session().region_name - xgboost_container=sagemaker.image_uris.retrieve("xgboost", region, "1.5-1") - - estimator=Estimator( - role=sagemaker.get_execution_role() - image_uri=xgboost_container, - base_job_name="debugger-demo", - instance_count=1, - instance_type="ml.m5.2xlarge", - - # Debugger-specific parameters - profiler_config=profiler_config, - rules=rules - ) - - estimator.fit(wait=False) -