class_docstr: The SageMaker Debugger ProfilerRule class configures *profiling* rules.
  
  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.
  
  .. tip::
      Use the following ``ProfilerRule.sagemaker`` class method for built-in profiling rules
      or the ``ProfilerRule.custom`` class method for custom profiling rules.
      Do not directly use the `Rule` initialization method.
class_docstr_tok: ["The","SageMaker","Debugger","ProfilerRule","class","configures","*","profiling","*","rules",".","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",".","..","tip",":",":","Use","the","following","``","ProfilerRule.sagemaker","``","class","method","for","built-in","profiling","rules","or","the","``","ProfilerRule.custom","``","class","method","for","custom","profiling","rules",".","Do","not","directly","use","the","`","Rule","`","initialization","method","."]
docstr: Generates a request dictionary using the parameters provided when initializing object.
  
  Returns:
      dict: An portion of an API request as a dictionary.
code: def to_profiler_rule_config_dict(self):
      """Generates a request dictionary using the parameters provided when initializing object.
  
      Returns:
          dict: An portion of an API request as a dictionary.
  
      """
      profiler_rule_config_request = {
          "RuleConfigurationName": self.name,
          "RuleEvaluatorImage": self.image_uri,
      }
  
      profiler_rule_config_request.update(
          build_dict("InstanceType", self.instance_type)
      )
      profiler_rule_config_request.update(
          build_dict("VolumeSizeInGB", self.volume_size_in_gb)
      )
      profiler_rule_config_request.update(
          build_dict("LocalPath", self.container_local_output_path)
      )
      profiler_rule_config_request.update(
          build_dict("S3OutputPath", self.s3_output_path)
      )
  
      if self.rule_parameters:
          profiler_rule_config_request[
              "RuleParameters"
          ] = self.rule_parameters
          for k, v in profiler_rule_config_request[
              "RuleParameters"
          ].items():
              profiler_rule_config_request["RuleParameters"][k] = str(v)
  
      return profiler_rule_config_request
  
imports: from __future__ import absolute_import
  from abc import ABC
  from typing import Union, Optional, List, Dict
  import attr
  import smdebug_rulesconfig
  from sagemaker import image_uris
  from sagemaker.utils import build_dict, name_from_base
  from sagemaker.workflow.entities import PipelineVariable
  from sagemaker.debugger.profiler_constants import DETAIL_PROF_PROCESSING_DEFAULT_INSTANCE_TYPE, DETAIL_PROF_PROCESSING_DEFAULT_VOLUME_SIZE
label_desc: Use image node_id 3 for calling the ProfilerRule obj's underlying member method code with example usage: obj.to_profiler_rule_config_dict() and returns: profiler_rule_config_request