Skip to content

Latest commit

 

History

History
102 lines (68 loc) · 3.29 KB

profiler.rst

File metadata and controls

102 lines (68 loc) · 3.29 KB

Profiler

Amazon SageMaker Profiler provides full visibility into provisioned compute resources for training state-of-the-art deep learning models. The following SageMaker Profiler classes are for activating SageMaker Profiler while creating an estimator object of :class:sagemaker.pytorch.estimator.PyTorch or :class:sagemaker.tensorflow.estimator.TensorFlow.

sagemaker.debugger

Profiler configuration modules

A configuration class to activate Amazon SageMaker Profiler.

To adjust the Profiler configuration instead of using the default configuration, use the following parameters.

Parameters:

  • cpu_profiling_duration (str): Specify the time duration in seconds for profiling CPU activities. The default value is 3600 seconds.

Example usage:

import sagemaker
from sagemaker.pytorch import PyTorch
from sagemaker import ProfilerConfig, Profiler

profiler_config = ProfilerConfig(
    profiler_params = Profiler(cpu_profiling_duration=3600)
)

estimator = PyTorch(
    framework_version="2.0.0",
    ... # Set up other essential parameters for the estimator class
    profiler_config=profiler_config
)

For a complete instruction on activating and using SageMaker Profiler, see Use Amazon SageMaker Profiler to profile activities on AWS compute resources.

sagemaker.ProfilerConfig

Profiler Rule APIs

The following API is for setting up SageMaker Debugger's profiler rules to detect computational performance issues from training jobs.

ProfilerRule

Debugger Configuration APIs for Framework Profiling (Deprecated)

Warning

In favor of Amazon SageMaker Profiler, SageMaker Debugger deprecates the framework profiling feature starting from TensorFlow 2.11 and PyTorch 2.0. You can still use the feature in the previous versions of the frameworks and SDKs as follows.

  • SageMaker Python SDK <= v2.130.0
  • PyTorch >= v1.6.0, < v2.0
  • TensorFlow >= v2.3.1, < v2.11

With the deprecation, SageMaker Debugger discontinues support for the APIs below this note.

See also Amazon SageMaker Debugger Release Notes: March 16, 2023.

FrameworkProfile

DetailedProfilingConfig

DataloaderProfilingConfig

PythonProfilingConfig

PythonProfiler

cProfileTimer

sagemaker.debugger.metrics_config