class_docstr: The SageMaker Training Compiler configuration class.
docstr: Checks if SageMaker Training Compiler is configured correctly.
  
  Args:
      estimator (:class:`sagemaker.tensorflow.estimator.TensorFlow`): A estimator object
          If SageMaker Training Compiler is enabled, it will validate whether
          the estimator is configured to be compatible with Training Compiler.
  
  Raises:
      ValueError: Raised if the requested configuration is not compatible
                  with SageMaker Training Compiler.
docstr_tok: ["Checks","if","SageMaker","Training","Compiler","is","configured","correctly",".","Args",":","estimator","(",":","class",":","`","sagemaker.tensorflow.estimator.TensorFlow","`",")",":","A","estimator","object","If","SageMaker","Training","Compiler","is","enabled",",","it","will","validate","whether","the","estimator","is","configured","to","be","compatible","with","Training","Compiler",".","Raises",":","ValueError",":","Raised","if","the","requested","configuration","is","not","compatible","with","SageMaker","Training","Compiler","."]
code: def validate(cls, estimator):
      """Checks if SageMaker Training Compiler is configured correctly.
  
      Args:
          estimator (:class:`sagemaker.tensorflow.estimator.TensorFlow`): A estimator object
              If SageMaker Training Compiler is enabled, it will validate whether
              the estimator is configured to be compatible with Training Compiler.
  
      Raises:
          ValueError: Raised if the requested configuration is not compatible
                      with SageMaker Training Compiler.
      """
  
      super(TrainingCompilerConfig, cls).validate(estimator)
  
      if estimator.framework_version:
          if Version(estimator.framework_version) not in SpecifierSet(
              f">= {cls.MIN_SUPPORTED_VERSION}",
              f"<= {cls.MAX_SUPPORTED_VERSION}",
          ):
              error_helper_string = (
                  "SageMaker Training Compiler only supports TensorFlow version "
                  "between {} to {} but received {}"
              )
              error_helper_string = error_helper_string.format(
                  cls.MIN_SUPPORTED_VERSION,
                  cls.MAX_SUPPORTED_VERSION,
                  estimator.framework_version,
              )
              raise ValueError(error_helper_string)
  
      if (
          estimator.distribution
          and "multi_worker_mirrored_strategy" in estimator.distribution
      ):
          mwms_enabled = estimator.distribution.get(
              "multi_worker_mirrored_strategy"
          ).get("enabled", False)
          if mwms_enabled:
              raise ValueError(
                  "Multi Worker Mirrored Strategy distributed training configuration "
                  "is currently not compatible with SageMaker Training Compiler."
              )
  
file_path: sagemaker-python-sdk/src/sagemaker/tensorflow/training_compiler/config.py
imports: from __future__ import absolute_import
  import logging
  from packaging.specifiers import SpecifierSet
  from packaging.version import Version
  from sagemaker.training_compiler.config import TrainingCompilerConfig
label_desc: Use image node_id 2 for calling the TrainingCompilerConfig obj's underlying member method code with example usage: obj.validate(cls, estimator) without return types