class_docstr: The SageMaker Debugger Rule class configures *debugging* rules to debug your training job.
  
  The debugging rules analyze tensor outputs from your training job
  and monitor conditions that are critical for the success of the training
  job.
  
  SageMaker Debugger comes pre-packaged with built-in *debugging* rules.
  For example, the debugging rules can detect whether gradients are getting too large or
  too small, or if a model is overfitting.
  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 rules using the custom rule classmethod.
class_docstr_tok: ["The","SageMaker","Debugger","Rule","class","configures","*","debugging","*","rules","to","debug","your","training","job",".","The","debugging","rules","analyze","tensor","outputs","from","your","training","job","and","monitor","conditions","that","are","critical","for","the","success","of","the","training","job",".","SageMaker","Debugger","comes","pre-packaged","with","built-in","*","debugging","*","rules",".","For","example",",","the","debugging","rules","can","detect","whether","gradients","are","getting","too","large","or","too","small",",","or","if","a","model","is","overfitting",".","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","rules","using","the","custom","rule","classmethod","."]
docstr: Prepare actions for Debugger Rule.
  
  Args:
      training_job_name (str): The training job name. To be set as the default training job
          prefix for the StopTraining action if it is specified.
code: def prepare_actions(self, training_job_name):
      """Prepare actions for Debugger Rule.
  
      Args:
          training_job_name (str): The training job name. To be set as the default training job
              prefix for the StopTraining action if it is specified.
      """
      if self.actions is None:
          # user cannot manually specify action_json in rule_parameters for actions.
          self.rule_parameters.pop("action_json", None)
          return
  
      self.actions.update_training_job_prefix_if_not_specified(
          training_job_name
      )
      action_params = {"action_json": self.actions.serialize()}
      self.rule_parameters.update(action_params)
  
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 4 for calling the Rule obj's underlying member method code with example usage: obj.prepare_actions(training_job_name) without return types