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: Set rule parameters for Debugger Rule.
  
  Args:
      source (str): Optional. 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): Optional. The name of the rule to invoke within the source.
          If provided, you must also provide source.
      other_trials_s3_input_paths ([str]): Optional. S3 input paths for other trials.
      rule_parameters (dict): Optional. A dictionary of parameters for the rule.
  
  Returns:
      dict: A dictionary of rule parameters.
code: def _set_rule_parameters(
      source,
      rule_to_invoke,
      other_trials_s3_input_paths,
      rule_parameters,
  ):
      """Set rule parameters for Debugger Rule.
  
      Args:
          source (str): Optional. 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): Optional. The name of the rule to invoke within the source.
              If provided, you must also provide source.
          other_trials_s3_input_paths ([str]): Optional. S3 input paths for other trials.
          rule_parameters (dict): Optional. A dictionary of parameters for the rule.
  
      Returns:
          dict: A dictionary of rule parameters.
  
      """
      merged_rule_params = {}
      if other_trials_s3_input_paths is not None:
          for index, s3_input_path in enumerate(
              other_trials_s3_input_paths
          ):
              merged_rule_params[
                  "other_trial_{}".format(str(index))
              ] = s3_input_path
  
      merged_rule_params.update(
          super(Rule, Rule)._set_rule_parameters(
              source, rule_to_invoke, rule_parameters
          )
      )
      return merged_rule_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 5 for calling the Rule obj's underlying member method code with example usage: obj._set_rule_parameters(source, rule_to_invoke, other_trials_s3_input_paths, rule_parameters) and returns: merged_rule_params