TrainingCompilerConfig: The configuration class for accelerating SageMaker training...

TrainingCompilerConfigR Documentation

The configuration class for accelerating SageMaker training jobs through compilation.

Description

SageMaker Training Compiler speeds up training by optimizing the model execution graph.

Public fields

DEBUG_PATH

Placeholder

SUPPORTED_INSTANCE_CLASS_PREFIXES

Placeholder

HP_ENABLE_COMPILER

Placeholder

HP_ENABLE_DEBUG

Placeholder

Methods

Public methods


Method new()

This class initializes a “TrainingCompilerConfig“ instance. Pass the output of it to the “compiler_config“ parameter of the :class:'~sagemaker.huggingface.HuggingFace' class.

Usage
TrainingCompilerConfig$new(enabled = TRUE, debug = FALSE)
Arguments
enabled

(bool): Optional. Switch to enable SageMaker Training Compiler. The default is True.

debug

(bool): Optional. Whether to dump detailed logs for debugging. This comes with a potential performance slowdown. The default is FALSE.


Method disclaimers_and_warnings()

Disclaimers and warnings. Logs disclaimers and warnings about the requested configuration of SageMaker Training Compiler.

Usage
TrainingCompilerConfig$disclaimers_and_warnings()

Method .to_hyperparameter_list()

Converts configuration object into hyperparameters.

Usage
TrainingCompilerConfig$.to_hyperparameter_list()
Returns

(list): A portion of the hyperparameters passed to the training job as a list


Method validate()

Checks if SageMaker Training Compiler is configured correctly.

Usage
TrainingCompilerConfig$validate(image_uri, instance_type, distribution)
Arguments
image_uri

(str): A string of a Docker image URI that's specified to :class:'~sagemaker.huggingface.HuggingFace'. If SageMaker Training Compiler is enabled, the HuggingFace estimator automatically chooses the right image URI. You cannot specify and override the image URI.

instance_type

(str): A string of the training instance type that's specified to :class:'~sagemaker.huggingface.HuggingFace'. The 'validate' classmethod raises error if an instance type not in the “SUPPORTED_INSTANCE_CLASS_PREFIXES“ list or “local“ is passed to the 'instance_type' parameter.

distribution

(dict): A dictionary of the distributed training option that's specified to :class:'~sagemaker.huggingface.HuggingFace'. SageMaker's distributed data parallel and model parallel libraries are currently not compatible with SageMaker Training Compiler.


Method clone()

The objects of this class are cloneable with this method.

Usage
TrainingCompilerConfig$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


DyfanJones/sagemaker-r-mlcore documentation built on May 3, 2022, 10:08 a.m.