ProfilerRule: The SageMaker Debugger ProfilerRule class configures...

ProfilerRuleR Documentation

The SageMaker Debugger ProfilerRule class configures *profiling* rules.

Description

SageMaker Debugger profiling rules automatically analyze hardware system resource utilization and framework metrics of a training job to identify performance bottlenecks. SageMaker Debugger comes pre-packaged with built-in *profiling* rules. For example, the profiling rules can detect if GPUs are underutilized due to CPU bottlenecks or IO bottlenecks. For a full list of built-in rules for debugging, see 'List of Debugger Built-in Rules' https://docs.aws.amazon.com/sagemaker/latest/dg/debugger-built-in-rules.html. You can also write your own profiling rules using the Amazon SageMaker Debugger APIs.

Super class

sagemaker.common::RuleBase -> ProfilerRule

Methods

Public methods

Inherited methods

Method sagemaker()

Initialize a “ProfilerRule“ object for a *built-in* profiling rule. The rule analyzes system and framework metrics of a given training job to identify performance bottlenecks.

Usage
ProfilerRule$sagemaker(
  base_config,
  name = NULL,
  container_local_output_path = NULL,
  s3_output_path = NULL
)
Arguments
base_config

(sagemaker.debugger::ProfilerReport): The base rule configuration object returned from the sagemaker.debugger method. For example, sagemaker.debugger::ProfilerReport$new(). For a full list of built-in rules for debugging, see 'List of Debugger Built-in Rules' https://docs.aws.amazon.com/sagemaker/latest/dg/debugger-built-in-rules.html.

name

(str): The name of the profiler rule. If one is not provided, the name of the base_config will be used.

container_local_output_path

(str): The path in the container.

s3_output_path

(str): The location in Amazon S3 to store the profiling output data. The default Debugger output path for profiling data is created under the default output path of the :class:'~sagemaker.estimator.Estimator' class. For example, s3://sagemaker-<region>-<12digit_account_id>/<training-job-name>/profiler-output/.

Returns

:class:'~sagemaker.debugger.ProfilerRule': The instance of the built-in ProfilerRule.


Method custom()

Initialize a “ProfilerRule“ object for a *custom* profiling rule. You can create a rule that analyzes system and framework metrics emitted during the training of a model and monitors conditions that are critical for the success of a training job.

Usage
ProfilerRule$custom(
  name,
  image_uri,
  instance_type,
  volume_size_in_gb,
  source = NULL,
  rule_to_invoke = NULL,
  container_local_output_path = NULL,
  s3_output_path = NULL,
  rule_parameters = NULL
)
Arguments
name

(str): The name of the profiler rule.

image_uri

(str): The URI of the image to be used by the proflier rule.

instance_type

(str): Type of EC2 instance to use, for example, 'ml.c4.xlarge'.

volume_size_in_gb

(int): Size in GB of the EBS volume to use for storing data.

source

(str): A source file containing a rule to invoke. If provided, you must also provide rule_to_invoke. This can either be an S3 uri or a local path.

rule_to_invoke

(str): The name of the rule to invoke within the source. If provided, you must also provide the source.

container_local_output_path

(str): The path in the container.

s3_output_path

(str): The location in Amazon S3 to store the output. The default Debugger output path for profiling data is created under the default output path of the :class:'~sagemaker.estimator.Estimator' class. For example, s3://sagemaker-<region>-<12digit_account_id>/<training-job-name>/profiler-output/.

rule_parameters

(dict): A dictionary of parameters for the rule.

Returns

:class:'~sagemaker.debugger.ProfilerRule': The instance of the custom ProfilerRule.


Method to_profiler_rule_config_list()

Generates a request dictionary using the parameters provided when initializing object.

Usage
ProfilerRule$to_profiler_rule_config_list()
Returns

lict: An portion of an API request as a dictionary.


Method clone()

The objects of this class are cloneable with this method.

Usage
ProfilerRule$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


DyfanJones/sagemaker-r-common documentation built on June 14, 2022, 10:31 p.m.