PythonProfilingConfig | R Documentation |
The configuration for framework metrics to be collected for Python profiling.
sagemaker.common::MetricsConfigBase
-> PythonProfilingConfig
new()
Choose a Python profiler: cProfile or Pyinstrument.
Specify target steps or a target duration to profile.
If no parameter is specified,
it profiles based on profiling configurations
preset by the profile_default_steps
parameter,
which is set to 'True' by default.
If you specify the following parameters,
then the profile_default_steps
parameter
will be ignored.
PythonProfilingConfig$new( start_step = NULL, num_steps = NULL, start_unix_time = NULL, duration = NULL, profile_default_steps = FALSE, python_profiler = PythonProfiler$CPROFILE, cprofile_timer = cProfileTimer$TOTAL_TIME )
start_step
(int): The step to start profiling. The default is step 9.
num_steps
(int): The number of steps to profile. The default is for 3 steps.
start_unix_time
(int): The Unix time to start profiling.
duration
(float): The duration in seconds to profile.
profile_default_steps
(bool): Indicates whether the default configuration should be used. If set to 'True', Python profiling will be done at step 9, 10, and 11 of training, using cProfiler and collecting metrics based on the total time, cpu time, and off cpu time for these three steps respectively. The default is “True“.
python_profiler
(PythonProfiler): The Python profiler to use to collect python profiling stats. Available options are “"cProfile"“ and “"Pyinstrument"“. The default is “"cProfile"“. Instead of passing the string values, you can also use the enumerator util, :class:'~sagemaker.debugger.utils.PythonProfiler', to choose one of the available options.
cprofile_timer
(cProfileTimer): The timer to be used by cProfile when collecting python profiling stats. Available options are “"total_time"“, “"cpu_time"“, and “"off_cpu_time"“. The default is “"total_time"“. If you choose Pyinstrument, this parameter is ignored. Instead of passing the string values, you can also use the enumerator util, :class:'~sagemaker.debugger.utils.cProfileTimer', to choose one of the available options.
clone()
The objects of this class are cloneable with this method.
PythonProfilingConfig$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.