class_docstr: Class that builds a deployable model.
  
  Args:
      role_arn (Optional[str]): The role for the endpoint.
      model_path (Optional[str]): The path of the model directory.
      sagemaker_session (Optional[sagemaker.session.Session]): The
          SageMaker session to use for the execution.
      name (Optional[str]): The model name.
      mode (Optional[Mode]): The mode of operation. The following
          modes are supported:
  
          * ``Mode.SAGEMAKER_ENDPOINT``: Launch on a SageMaker endpoint
          * ``Mode.LOCAL_CONTAINER``: Launch locally with a container
  
      shared_libs (List[str]): Any shared libraries you want to bring into
          the model packaging.
      dependencies (Optional[Dict[str, Any]): The dependencies of the model
          or container. Takes a dict as an input where you can specify
          autocapture as ``True`` or ``False``, a requirements file, or custom
          dependencies as a list. A sample ``dependencies`` dict:
  
          .. code:: python
  
              {
                  "auto": False,
                  "requirements": "/path/to/requirements.txt",
                  "custom": ["custom_module==1.2.3",
                    "other_module@http://some/website.whl"],
              }
  
      env_vars (Optional[Dict[str, str]): The environment variables for the runtime
          execution.
      log_level (Optional[int]): The log level. Possible values are ``CRITICAL``,
          ``ERROR``, ``WARNING``, ``INFO``, ``DEBUG``, and ``NOTSET``.
      content_type (Optional[str]): The content type of the endpoint input data. This value
          is automatically derived from the input sample, but you can override it.
      accept_type (Optional[str]): The content type of the data accepted from the endpoint.
          This value is automatically derived from the output sample, but you can override
          the value.
      s3_model_data_url (Optional[str]): The S3 location where you want to upload the model
          package. Defaults to a S3 bucket prefixed with the account ID.
      instance_type (Optional[str]): The instance type of the endpoint. Defaults to the CPU
          instance type to help narrow the container type based on the instance family.
      schema_builder (Optional[SchemaBuilder]): The input/output schema of the model.
          The schema builder translates the input into bytes and converts the response
          into a stream. All translations between the server and the client are handled
          automatically with the specified input and output.
      model (Optional[Union[object, str]): Model object (with ``predict`` method to perform
          inference) or a HuggingFace/JumpStart Model ID. Either ``model`` or
          ``inference_spec`` is required for the model builder to build the artifact.
      inference_spec (InferenceSpec): The inference spec file with your customized
          ``invoke`` and ``load`` functions.
      image_uri (Optional[str]): The container image uri (which is derived from a
          SageMaker-based container).
      model_server (Optional[ModelServer]): The model server to which to deploy.
          You need to provide this argument when you specify an ``image_uri``
          in order for model builder to build the artifacts correctly (according
          to the model server). Possible values for this argument are
          ``TORCHSERVE``, ``MMS``, ``TENSORFLOW_SERVING``, ``DJL_SERVING``,
          ``TRITON``, and ``TGI``.
class_docstr_tok: ["Class","that","builds","a","deployable","model",".","Args",":","role_arn","(","Optional","[","str","]",")",":","The","role","for","the","endpoint",".","model_path","(","Optional","[","str","]",")",":","The","path","of","the","model","directory",".","sagemaker_session","(","Optional","[","sagemaker.session.Session","]",")",":","The","SageMaker","session","to","use","for","the","execution",".","name","(","Optional","[","str","]",")",":","The","model","name",".","mode","(","Optional","[","Mode","]",")",":","The","mode","of","operation",".","The","following","modes","are","supported",":","*","``","Mode.SAGEMAKER_ENDPOINT","``",":","Launch","on","a","SageMaker","endpoint","*","``","Mode.LOCAL_CONTAINER","``",":","Launch","locally","with","a","container","shared_libs","(","List","[","str","]",")",":","Any","shared","libraries","you","want","to","bring","into","the","model","packaging",".","dependencies","(","Optional","[","Dict","[","str",",","Any","]",")",":","The","dependencies","of","the","model","or","container",".","Takes","a","dict","as","an","input","where","you","can","specify","autocapture","as","``","True","``","or","``","False","``",",","a","requirements","file",",","or","custom","dependencies","as","a","list",".","A","sample","``","dependencies","``","dict",":","..","code",":",":","python","{","``","auto","''",":","False",",","``","requirements","''",":","``","\/path\/to\/requirements.txt","''",",","``","custom","''",":","[","``","custom_module==1.2.3","''",",","``","other_module","@","http",":","\/\/some\/website.whl","''","]",",","}","env_vars","(","Optional","[","Dict","[","str",",","str","]",")",":","The","environment","variables","for","the","runtime","execution",".","log_level","(","Optional","[","int","]",")",":","The","log","level",".","Possible","values","are","``","CRITICAL","``",",","``","ERROR","``",",","``","WARNING","``",",","``","INFO","``",",","``","DEBUG","``",",","and","``","NOTSET","``",".","content_type","(","Optional","[","str","]",")",":","The","content","type","of","the","endpoint","input","data",".","This","value","is","automatically","derived","from","the","input","sample",",","but","you","can","override","it",".","accept_type","(","Optional","[","str","]",")",":","The","content","type","of","the","data","accepted","from","the","endpoint",".","This","value","is","automatically","derived","from","the","output","sample",",","but","you","can","override","the","value",".","s3_model_data_url","(","Optional","[","str","]",")",":","The","S3","location","where","you","want","to","upload","the","model","package",".","Defaults","to","a","S3","bucket","prefixed","with","the","account","ID",".","instance_type","(","Optional","[","str","]",")",":","The","instance","type","of","the","endpoint",".","Defaults","to","the","CPU","instance","type","to","help","narrow","the","container","type","based","on","the","instance","family",".","schema_builder","(","Optional","[","SchemaBuilder","]",")",":","The","input\/output","schema","of","the","model",".","The","schema","builder","translates","the","input","into","bytes","and","converts","the","response","into","a","stream",".","All","translations","between","the","server","and","the","client","are","handled","automatically","with","the","specified","input","and","output",".","model","(","Optional","[","Union","[","object",",","str","]",")",":","Model","object","(","with","``","predict","``","method","to","perform","inference",")","or","a","HuggingFace\/JumpStart","Model","ID",".","Either","``","model","``","or","``","inference_spec","``","is","required","for","the","model","builder","to","build","the","artifact",".","inference_spec","(","InferenceSpec",")",":","The","inference","spec","file","with","your","customized","``","invoke","``","and","``","load","``","functions",".","image_uri","(","Optional","[","str","]",")",":","The","container","image","uri","(","which","is","derived","from","a","SageMaker-based","container",")",".","model_server","(","Optional","[","ModelServer","]",")",":","The","model","server","to","which","to","deploy",".","You","need","to","provide","this","argument","when","you","specify","an","``","image_uri","``","in","order","for","model","builder","to","build","the","artifacts","correctly","(","according","to","the","model","server",")",".","Possible","values","for","this","argument","are","``","TORCHSERVE","``",",","``","MMS","``",",","``","TENSORFLOW_SERVING","``",",","``","DJL_SERVING","``",",","``","TRITON","``",",","and","``","TGI","``","."]
docstr: Placeholder docstring
code: def _create_model(self):
      """Placeholder docstring"""
      # TODO: we should create model as per the framework
      self.pysdk_model = Model(
          image_uri=self.image_uri,
          model_data=self.s3_upload_path,
          role=self.serve_settings.role_arn,
          env=self.env_vars,
          sagemaker_session=self.sagemaker_session,
          predictor_cls=self._get_predictor,
      )
  
      # store the modes in the model so that we may
      # reference the configurations for local deploy() & predict()
      self.pysdk_model.mode = self.mode
      self.pysdk_model.modes = self.modes
      self.pysdk_model.serve_settings = self.serve_settings
  
      # dynamically generate a method to direct model.deploy() logic based on mode
      # unique method to models created via ModelBuilder()
      self._original_deploy = self.pysdk_model.deploy
      self.pysdk_model.deploy = self._model_builder_deploy_wrapper
      self._original_register = self.pysdk_model.register
      self.pysdk_model.register = self._model_builder_register_wrapper
      self.model_package = None
      return self.pysdk_model
  
imports: from __future__ import absolute_import
  import uuid
  from typing import Any, Type, List, Dict, Optional, Union
  from dataclasses import dataclass, field
  import logging
  import os
  from pathlib import Path
  from sagemaker import Session
  from sagemaker.model import Model
  from sagemaker.base_predictor import PredictorBase
  from sagemaker.serializers import NumpySerializer, TorchTensorSerializer
  from sagemaker.deserializers import JSONDeserializer, TorchTensorDeserializer
  from sagemaker.serve.builder.schema_builder import SchemaBuilder
  from sagemaker.serve.mode.function_pointers import Mode
  from sagemaker.serve.mode.sagemaker_endpoint_mode import SageMakerEndpointMode
  from sagemaker.serve.mode.local_container_mode import LocalContainerMode
  from sagemaker.serve.detector.pickler import save_pkl, save_xgboost
  from sagemaker.serve.builder.serve_settings import _ServeSettings
  from sagemaker.serve.builder.djl_builder import DJL
  from sagemaker.serve.builder.tgi_builder import TGI
  from sagemaker.serve.builder.jumpstart_builder import JumpStart
  from sagemaker.predictor import Predictor
  from sagemaker.serve.save_retrive.version_1_0_0.metadata.metadata import Metadata
  from sagemaker.serve.spec.inference_spec import InferenceSpec
  from sagemaker.serve.utils.predictors import _get_local_mode_predictor
  from sagemaker.serve.detector.image_detector import auto_detect_container, _detect_framework_and_version, _get_model_base
  from sagemaker.serve.model_server.torchserve.prepare import prepare_for_torchserve
  from sagemaker.serve.model_server.triton.triton_builder import Triton
  from sagemaker.serve.utils.telemetry_logger import _capture_telemetry
  from sagemaker.serve.utils.types import ModelServer
  from sagemaker.serve.validations.check_image_uri import is_1p_image_uri
  from sagemaker.serve.save_retrive.version_1_0_0.save.save_handler import SaveHandler
  from sagemaker.serve.save_retrive.version_1_0_0.metadata.metadata import get_metadata
  from sagemaker.serve.validations.check_image_and_hardware_type import validate_image_uri_and_hardware
label_desc: Use image node_id 8 for calling the ModelBuilder obj's underlying member method code with example usage: obj._create_model() and returns: self