class_docstr: TGI build logic for ModelBuilder()
class_docstr_tok: ["TGI","build","logic","for","ModelBuilder","(",")"]
docstr: Placeholder docstring
docstr_tok: ["Placeholder","docstring"]
code: def _create_tgi_model(self) -> Type[Model]:
      """Placeholder docstring"""
      if not self.image_uri:
          self.image_uri = get_huggingface_llm_image_uri(
              "huggingface", session=self.sagemaker_session
          )
          logger.info(
              "Auto detected %s. Proceeding with the the deployment.",
              self.image_uri,
          )
  
      pysdk_model = HuggingFaceModel(
          image_uri=self.image_uri,
          env=self.env_vars,
          role=self.role_arn,
          sagemaker_session=self.sagemaker_session,
      )
  
      self._original_deploy = pysdk_model.deploy
      pysdk_model.deploy = self._tgi_model_builder_deploy_wrapper
      return pysdk_model
  
imports: from __future__ import absolute_import
  import logging
  from typing import Type
  from abc import ABC, abstractmethod
  from datetime import datetime, timedelta
  from sagemaker.model import Model
  from sagemaker.serve.utils.exceptions import LocalDeepPingException, LocalModelLoadException, LocalModelOutOfMemoryException, LocalModelInvocationException, SkipTuningComboException
  from sagemaker.serve.utils.tuning import _serial_benchmark, _concurrent_benchmark, _more_performant, _pretty_print_results_tgi
  from sagemaker.djl_inference.model import _get_model_config_properties_from_hf
  from sagemaker.serve.model_server.djl_serving.utils import _get_admissible_tensor_parallel_degrees, _get_default_tensor_parallel_degree
  from sagemaker.serve.model_server.tgi.utils import _get_default_tgi_configurations, _get_admissible_dtypes
  from sagemaker.huggingface import HuggingFaceModel, get_huggingface_llm_image_uri
  from sagemaker.serve.utils.local_hardware import _get_nb_instance, _get_ram_usage_mb, _get_gpu_info, _get_gpu_info_fallback
  from sagemaker.serve.model_server.tgi.prepare import _create_dir_structure
  from sagemaker.serve.utils.predictors import TgiLocalModePredictor
  from sagemaker.serve.utils.types import ModelServer
  from sagemaker.serve.mode.function_pointers import Mode
  from sagemaker.serve.utils.telemetry_logger import _capture_telemetry
  from sagemaker.base_predictor import PredictorBase
label_desc: Use image node_id 6 for calling the TGI obj's underlying member method code with example usage: obj._create_tgi_model() and returns: pysdk_model