class_docstr: The SageMaker Training Compiler configuration class.
class_docstr_tok: ["The","SageMaker","Training","Compiler","configuration","class","."]
docstr: This class initializes a ``TrainingCompilerConfig`` instance.
  
  `Amazon SageMaker Training Compiler
  <https://docs.aws.amazon.com/sagemaker/latest/dg/training-compiler.html>`_
  is a feature of SageMaker Training
  and speeds up training jobs by optimizing model execution graphs.
  
  You can compile Hugging Face models
  by passing the object of this configuration class to the ``compiler_config``
  parameter of the :class:`~sagemaker.huggingface.HuggingFace`
  estimator.
  
  Args:
      enabled (bool or PipelineVariable): Optional. Switch to enable SageMaker
          Training Compiler. The default is ``True``.
      debug (bool or PipelineVariable): Optional. Whether to dump detailed logs
          for debugging. This comes with a potential performance slowdown.
          The default is ``False``.
  
  **Example**: The following code shows the basic usage of the
  :class:`sagemaker.huggingface.TrainingCompilerConfig()` class
  to run a HuggingFace training job with the compiler.
  
  .. code-block:: python
  
      from sagemaker.huggingface import HuggingFace, TrainingCompilerConfig
  
      huggingface_estimator=HuggingFace(
          ...
          compiler_config=TrainingCompilerConfig()
      )
  
  .. seealso::
  
      For more information about how to enable SageMaker Training Compiler
      for various training settings such as using TensorFlow-based models,
      PyTorch-based models, and distributed training,
      see `Enable SageMaker Training Compiler
      <https://docs.aws.amazon.com/sagemaker/latest/dg/training-compiler-enable.html>`_
      in the `Amazon SageMaker Training Compiler developer guide
      <https://docs.aws.amazon.com/sagemaker/latest/dg/training-compiler.html>`_.
docstr_tok: ["This","class","initializes","a","``","TrainingCompilerConfig","``","instance",".","`","Amazon","SageMaker","Training","Compiler","<","https",":","\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/training-compiler.html",">","`","_","is","a","feature","of","SageMaker","Training","and","speeds","up","training","jobs","by","optimizing","model","execution","graphs",".","You","can","compile","Hugging","Face","models","by","passing","the","object","of","this","configuration","class","to","the","``","compiler_config","``","parameter","of","the",":","class",":","`","~sagemaker.huggingface.HuggingFace","`","estimator",".","Args",":","enabled","(","bool","or","PipelineVariable",")",":","Optional",".","Switch","to","enable","SageMaker","Training","Compiler",".","The","default","is","``","True","``",".","debug","(","bool","or","PipelineVariable",")",":","Optional",".","Whether","to","dump","detailed","logs","for","debugging",".","This","comes","with","a","potential","performance","slowdown",".","The","default","is","``","False","``",".","*","*","Example","*","*",":","The","following","code","shows","the","basic","usage","of","the",":","class",":","`","sagemaker.huggingface.TrainingCompilerConfig","(",")","`","class","to","run","a","HuggingFace","training","job","with","the","compiler",".","..","code-block",":",":","python","from","sagemaker.huggingface","import","HuggingFace",",","TrainingCompilerConfig","huggingface_estimator=HuggingFace","(","...","compiler_config=TrainingCompilerConfig","(",")",")","..","seealso",":",":","For","more","information","about","how","to","enable","SageMaker","Training","Compiler","for","various","training","settings","such","as","using","TensorFlow-based","models",",","PyTorch-based","models",",","and","distributed","training",",","see","`","Enable","SageMaker","Training","Compiler","<","https",":","\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/training-compiler-enable.html",">","`","_","in","the","`","Amazon","SageMaker","Training","Compiler","developer","guide","<","https",":","\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/training-compiler.html",">","`","_","."]
code: def __init__(
      self,
      enabled: Union[bool, PipelineVariable] = True,
      debug: Union[bool, PipelineVariable] = False,
  ):
      """This class initializes a ``TrainingCompilerConfig`` instance.
  
      `Amazon SageMaker Training Compiler
      <https://docs.aws.amazon.com/sagemaker/latest/dg/training-compiler.html>`_
      is a feature of SageMaker Training
      and speeds up training jobs by optimizing model execution graphs.
  
      You can compile Hugging Face models
      by passing the object of this configuration class to the ``compiler_config``
      parameter of the :class:`~sagemaker.huggingface.HuggingFace`
      estimator.
  
      Args:
          enabled (bool or PipelineVariable): Optional. Switch to enable SageMaker
              Training Compiler. The default is ``True``.
          debug (bool or PipelineVariable): Optional. Whether to dump detailed logs
              for debugging. This comes with a potential performance slowdown.
              The default is ``False``.
  
      **Example**: The following code shows the basic usage of the
      :class:`sagemaker.huggingface.TrainingCompilerConfig()` class
      to run a HuggingFace training job with the compiler.
  
      .. code-block:: python
  
          from sagemaker.huggingface import HuggingFace, TrainingCompilerConfig
  
          huggingface_estimator=HuggingFace(
              ...
              compiler_config=TrainingCompilerConfig()
          )
  
      .. seealso::
  
          For more information about how to enable SageMaker Training Compiler
          for various training settings such as using TensorFlow-based models,
          PyTorch-based models, and distributed training,
          see `Enable SageMaker Training Compiler
          <https://docs.aws.amazon.com/sagemaker/latest/dg/training-compiler-enable.html>`_
          in the `Amazon SageMaker Training Compiler developer guide
          <https://docs.aws.amazon.com/sagemaker/latest/dg/training-compiler.html>`_.
  
      """
  
      super(TrainingCompilerConfig, self).__init__(
          enabled=enabled, debug=debug
      )
  
file_path: sagemaker-python-sdk/src/sagemaker/huggingface/training_compiler/config.py
imports: from __future__ import absolute_import
  import logging
  from typing import Union
  from packaging.specifiers import SpecifierSet
  from packaging.version import Version
  from sagemaker.training_compiler.config import TrainingCompilerConfig
  from sagemaker.workflow.entities import PipelineVariable
label_desc: Use image node_id 1 to create a new TrainingCompilerConfig object from inherited base classes: BaseConfig with example: obj = TrainingCompilerConfig(enabled, debug)