class_docstr: Sets up the profiling configuration for framework metrics.
  
  Validates user inputs and fills in default values if no input is provided.
  There are three main profiling options to choose from:
  :class:`~sagemaker.debugger.metrics_config.DetailedProfilingConfig`,
  :class:`~sagemaker.debugger.metrics_config.DataloaderProfilingConfig`, and
  :class:`~sagemaker.debugger.metrics_config.PythonProfilingConfig`.
  
  The following list shows available scenarios of configuring the profiling options.
  
  1. None of the profiling configuration, step range, or time range is specified.
  SageMaker Debugger activates framework profiling based on the default settings
  of each profiling option.
  
  .. code-block:: python
  
      from sagemaker.debugger import ProfilerConfig, FrameworkProfile
  
      profiler_config=ProfilerConfig(
          framework_profile_params=FrameworkProfile()
      )
  
  2. Target step or time range is specified to
  this :class:`~sagemaker.debugger.metrics_config.FrameworkProfile` class.
  The requested target step or time range setting propagates to all of
  the framework profiling options.
  For example, if you configure this class as following, all of the profiling options
  profiles the 6th step:
  
  .. code-block:: python
  
      from sagemaker.debugger import ProfilerConfig, FrameworkProfile
  
      profiler_config=ProfilerConfig(
          framework_profile_params=FrameworkProfile(start_step=6, num_steps=1)
      )
  
  3. Individual profiling configurations are specified through
  the ``*_profiling_config`` parameters.
  SageMaker Debugger profiles framework metrics only for the specified profiling configurations.
  For example, if the :class:`~sagemaker.debugger.metrics_config.DetailedProfilingConfig` class
  is configured but not the other profiling options, Debugger only profiles based on the settings
  specified to the
  :class:`~sagemaker.debugger.metrics_config.DetailedProfilingConfig` class.
  For example, the following example shows a profiling configuration to perform
  detailed profiling at step 10, data loader profiling at step 9 and 10,
  and Python profiling at step 12.
  
  .. code-block:: python
  
      from sagemaker.debugger import ProfilerConfig, FrameworkProfile
  
      profiler_config=ProfilerConfig(
          framework_profile_params=FrameworkProfile(
              detailed_profiling_config=DetailedProfilingConfig(start_step=10, num_steps=1),
              dataloader_profiling_config=DataloaderProfilingConfig(start_step=9, num_steps=2),
              python_profiling_config=PythonProfilingConfig(start_step=12, num_steps=1),
          )
      )
  
  If the individual profiling configurations are specified in addition to
  the step or time range,
  SageMaker Debugger prioritizes the individual profiling configurations and ignores
  the step or time range. For example, in the following code,
  the ``start_step=1`` and ``num_steps=10`` will be ignored.
  
  .. code-block:: python
  
      from sagemaker.debugger import ProfilerConfig, FrameworkProfile
  
      profiler_config=ProfilerConfig(
          framework_profile_params=FrameworkProfile(
              start_step=1,
              num_steps=10,
              detailed_profiling_config=DetailedProfilingConfig(start_step=10, num_steps=1),
              dataloader_profiling_config=DataloaderProfilingConfig(start_step=9, num_steps=2),
              python_profiling_config=PythonProfilingConfig(start_step=12, num_steps=1)
          )
      )
docstr: Helper function to validate and set the provided range fields.
  
  Profiling occurs
  for all of the metrics using these fields as the specified range and default parameters
  for the rest of the configuration fields (if necessary).
  
  Args:
      start_step (int): The step at which to start profiling.
      num_steps (int): The number of steps to profile.
      start_unix_time (int): The UNIX time at which to start profiling.
      duration (float): The duration in seconds to profile.
  
  Returns:
      bool: Indicates whether a custom step or time range will be used for profiling.
docstr_tok: ["Helper","function","to","validate","and","set","the","provided","range","fields",".","Profiling","occurs","for","all","of","the","metrics","using","these","fields","as","the","specified","range","and","default","parameters","for","the","rest","of","the","configuration","fields","(","if","necessary",")",".","Args",":","start_step","(","int",")",":","The","step","at","which","to","start","profiling",".","num_steps","(","int",")",":","The","number","of","steps","to","profile",".","start_unix_time","(","int",")",":","The","UNIX","time","at","which","to","start","profiling",".","duration","(","float",")",":","The","duration","in","seconds","to","profile",".","Returns",":","bool",":","Indicates","whether","a","custom","step","or","time","range","will","be","used","for","profiling","."]
code: def _process_range_fields(
      self, start_step, num_steps, start_unix_time, duration
  ):
      """Helper function to validate and set the provided range fields.
  
      Profiling occurs
      for all of the metrics using these fields as the specified range and default parameters
      for the rest of the configuration fields (if necessary).
  
      Args:
          start_step (int): The step at which to start profiling.
          num_steps (int): The number of steps to profile.
          start_unix_time (int): The UNIX time at which to start profiling.
          duration (float): The duration in seconds to profile.
  
      Returns:
          bool: Indicates whether a custom step or time range will be used for profiling.
  
      """
      if start_step is num_steps is start_unix_time is duration is None:
          return False
  
      for config_class in ALL_METRIC_CONFIGS:
          config = config_class(
              start_step=start_step,
              num_steps=num_steps,
              start_unix_time=start_unix_time,
              duration=duration,
          )
          config_name = config.name
          config_json = config.to_json_string()
          self.profiling_parameters[config_name] = config_json
      return True
  
file_path: sagemaker-python-sdk/src/sagemaker/debugger/framework_profile.py
imports: from __future__ import absolute_import
  from sagemaker.debugger.metrics_config import DetailedProfilingConfig, DataloaderProfilingConfig, SMDataParallelProfilingConfig, HorovodProfilingConfig, PythonProfilingConfig
  from sagemaker.debugger.profiler_constants import BASE_FOLDER_DEFAULT, CLOSE_FILE_INTERVAL_DEFAULT, FILE_OPEN_FAIL_THRESHOLD_DEFAULT, MAX_FILE_SIZE_DEFAULT
  from sagemaker.debugger.utils import ErrorMessages
label_desc: Use image node_id 4 for calling the FrameworkProfile obj's underlying member method code with example usage: obj._process_range_fields(start_step, num_steps, start_unix_time, duration) and returns: True, False