FrameworkProfile | R Documentation |
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.
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.
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.
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. 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.
new()
Initialize the FrameworkProfile class object.
FrameworkProfile$new( local_path = BASE_FOLDER_DEFAULT, file_max_size = MAX_FILE_SIZE_DEFAULT, file_close_interval = CLOSE_FILE_INTERVAL_DEFAULT, file_open_fail_threshold = FILE_OPEN_FAIL_THRESHOLD_DEFAULT, detailed_profiling_config = NULL, dataloader_profiling_config = NULL, python_profiling_config = NULL, horovod_profiling_config = NULL, smdataparallel_profiling_config = NULL, start_step = NULL, num_steps = NULL, start_unix_time = NULL, duration = NULL )
local_path
(str):
file_max_size
(int):
file_close_interval
(int):
file_open_fail_threshold
(int):
detailed_profiling_config
(DetailedProfilingConfig): The configuration for detailed profiling. Configure it using the :class:'~sagemaker.debugger.metrics_config.DetailedProfilingConfig' class. Pass “DetailedProfilingConfig()“ to use the default configuration.
dataloader_profiling_config
(DataloaderProfilingConfig): The configuration for dataloader metrics profiling. Configure it using the :class:'~sagemaker.debugger.metrics_config.DataloaderProfilingConfig' class. Pass “DataloaderProfilingConfig()“ to use the default configuration.
python_profiling_config
(PythonProfilingConfig): The configuration for stats collected by the Python profiler (cProfile or Pyinstrument). Configure it using the :class:'~sagemaker.debugger.metrics_config.PythonProfilingConfig' class. Pass “PythonProfilingConfig()“ to use the default configuration.
horovod_profiling_config
:
smdataparallel_profiling_config
:
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.
format()
format class
FrameworkProfile$format()
clone()
The objects of this class are cloneable with this method.
FrameworkProfile$clone(deep = FALSE)
deep
Whether to make a deep clone.
library(sagemaker.common) profiler_config=ProfilerConfig$new( framework_profile_params=FrameworkProfile$new( start_step=1, num_steps=10, detailed_profiling_config=DetailedProfilingConfig$new(start_step=10, num_steps=1), dataloader_profiling_config=DataloaderProfilingConfig$new(start_step=9, num_steps=2), python_profiling_config=PythonProfilingConfig$new(start_step=12, num_steps=1) ) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.