class_docstr: JumpStartModel class.
  
  This class sets defaults based on the model ID and version.
class_docstr_tok: ["JumpStartModel","class",".","This","class","sets","defaults","based","on","the","model","ID","and","version","."]
docstr: Creates endpoint by calling base ``Model`` class `deploy` method.
  
  Create a SageMaker ``Model`` and ``EndpointConfig``, and deploy an
  ``Endpoint`` from this ``Model``.
  
  Any field set to ``None`` does not get passed to the parent class method.
  
  
  Args:
      initial_instance_count (Optional[int]): The initial number of instances to run
          in the ``Endpoint`` created from this ``Model``. If not using
          serverless inference or the model has not called ``right_size()``,
          then it need to be a number larger or equals
          to 1. (Default: None)
      instance_type (Optional[str]): The EC2 instance type to deploy this Model to.
          For example, 'ml.p2.xlarge', or 'local' for local mode. If not using
          serverless inference or the model has not called ``right_size()``,
          then it is required to deploy a model.
          (Default: None)
      serializer (Optional[:class:`~sagemaker.serializers.BaseSerializer`]): A
          serializer object, used to encode data for an inference endpoint
          (Default: None). If ``serializer`` is not None, then
          ``serializer`` will override the default serializer. The
          default serializer is set by the ``predictor_cls``. (Default: None).
      deserializer (Optional[:class:`~sagemaker.deserializers.BaseDeserializer`]): A
          deserializer object, used to decode data from an inference
          endpoint (Default: None). If ``deserializer`` is not None, then
          ``deserializer`` will override the default deserializer. The
          default deserializer is set by the ``predictor_cls``. (Default: None).
      accelerator_type (Optional[str]): Type of Elastic Inference accelerator to
          deploy this model for model loading and inference, for example,
          'ml.eia1.medium'. If not specified, no Elastic Inference
          accelerator will be attached to the endpoint. For more
          information:
          https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html
          (Default: None).
      endpoint_name (Optional[str]): The name of the endpoint to create (default:
          None). If not specified, a unique endpoint name will be created.
          (Default: None).
      tags (Optional[Tags]): Tags to attach to this
          specific endpoint. (Default: None).
      kms_key (Optional[str]): The ARN of the KMS key that is used to encrypt the
          data on the storage volume attached to the instance hosting the
          endpoint. (Default: None).
      wait (Optional[bool]): Whether the call should wait until the deployment of
          this model completes. (Default: True).
      data_capture_config (Optional[sagemaker.model_monitor.DataCaptureConfig]): Specifies
          configuration related to Endpoint data capture for use with
          Amazon SageMaker Model Monitoring. (Default: None).
      async_inference_config (Optional[sagemaker.model_monitor.AsyncInferenceConfig]):
          Specifies configuration related to async endpoint. Use this configuration when
          trying to create async endpoint and make async inference. If empty config object
          passed through, will use default config to deploy async endpoint. Deploy a
          real-time endpoint if it's None. (Default: None)
      serverless_inference_config (Optional[sagemaker.serverless.ServerlessInferenceConfig]):
          Specifies configuration related to serverless endpoint. Use this configuration
          when trying to create serverless endpoint and make serverless inference. If
          empty object passed through, will use pre-defined values in
          ``ServerlessInferenceConfig`` class to deploy serverless endpoint. Deploy an
          instance based endpoint if it's None. (Default: None)
      volume_size (Optional[int]): The size, in GB, of the ML storage volume attached to
          individual inference instance associated with the production variant. Currenly only
          Amazon EBS gp2 storage volumes are supported. (Default: None).
      model_data_download_timeout (Optional[int]): The timeout value, in seconds, to download
          and extract model data from Amazon S3 to the individual inference instance
          associated with this production variant. (Default: None).
      container_startup_health_check_timeout (Optional[int]): The timeout value, in seconds,
          for your inference container to pass health check by SageMaker Hosting. For more
          information about health check see:
          https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms-inference-code.html#your-algorithms-inference-algo-ping-requests
          (Default: None).
      inference_recommendation_id (Optional[str]): The recommendation id which specifies the
          recommendation you picked from inference recommendation job results and
          would like to deploy the model and endpoint with recommended parameters.
          (Default: None).
      explainer_config (Optional[sagemaker.explainer.ExplainerConfig]): Specifies online
          explainability configuration for use with Amazon SageMaker Clarify. (Default: None).
      accept_eula (bool): For models that require a Model Access Config, specify True or
          False to indicate whether model terms of use have been accepted.
          The `accept_eula` value must be explicitly defined as `True` in order to
          accept the end-user license agreement (EULA) that some
          models require. (Default: None).
      endpoint_logging (Optiona[bool]): If set to true, live logging will be emitted as
          the SageMaker Endpoint starts up. (Default: False).
      resources (Optional[ResourceRequirements]): The compute resource requirements
          for a model to be deployed to an endpoint. Only
          EndpointType.INFERENCE_COMPONENT_BASED supports this feature.
          (Default: None).
      managed_instance_scaling (Optional[Dict]): Managed intance scaling options,
          if configured Amazon SageMaker will manage the instance number behind the
          endpoint.
      endpoint_type (EndpointType): The type of endpoint used to deploy models.
          (Default: EndpointType.MODEL_BASED).
docstr_tok: ["Creates","endpoint","by","calling","base","``","Model","``","class","`","deploy","`","method",".","Create","a","SageMaker","``","Model","``","and","``","EndpointConfig","``",",","and","deploy","an","``","Endpoint","``","from","this","``","Model","``",".","Any","field","set","to","``","None","``","does","not","get","passed","to","the","parent","class","method",".","Args",":","initial_instance_count","(","Optional","[","int","]",")",":","The","initial","number","of","instances","to","run","in","the","``","Endpoint","``","created","from","this","``","Model","``",".","If","not","using","serverless","inference","or","the","model","has","not","called","``","right_size","(",")","``",",","then","it","need","to","be","a","number","larger","or","equals","to","1",".","(","Default",":","None",")","instance_type","(","Optional","[","str","]",")",":","The","EC2","instance","type","to","deploy","this","Model","to",".","For","example",",","'ml.p2.xlarge","'",",","or","'local","'","for","local","mode",".","If","not","using","serverless","inference","or","the","model","has","not","called","``","right_size","(",")","``",",","then","it","is","required","to","deploy","a","model",".","(","Default",":","None",")","serializer","(","Optional","[",":","class",":","`","~sagemaker.serializers.BaseSerializer","`","]",")",":","A","serializer","object",",","used","to","encode","data","for","an","inference","endpoint","(","Default",":","None",")",".","If","``","serializer","``","is","not","None",",","then","``","serializer","``","will","override","the","default","serializer",".","The","default","serializer","is","set","by","the","``","predictor_cls","``",".","(","Default",":","None",")",".","deserializer","(","Optional","[",":","class",":","`","~sagemaker.deserializers.BaseDeserializer","`","]",")",":","A","deserializer","object",",","used","to","decode","data","from","an","inference","endpoint","(","Default",":","None",")",".","If","``","deserializer","``","is","not","None",",","then","``","deserializer","``","will","override","the","default","deserializer",".","The","default","deserializer","is","set","by","the","``","predictor_cls","``",".","(","Default",":","None",")",".","accelerator_type","(","Optional","[","str","]",")",":","Type","of","Elastic","Inference","accelerator","to","deploy","this","model","for","model","loading","and","inference",",","for","example",",","'ml.eia1.medium","'",".","If","not","specified",",","no","Elastic","Inference","accelerator","will","be","attached","to","the","endpoint",".","For","more","information",":","https",":","\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/ei.html","(","Default",":","None",")",".","endpoint_name","(","Optional","[","str","]",")",":","The","name","of","the","endpoint","to","create","(","default",":","None",")",".","If","not","specified",",","a","unique","endpoint","name","will","be","created",".","(","Default",":","None",")",".","tags","(","Optional","[","Tags","]",")",":","Tags","to","attach","to","this","specific","endpoint",".","(","Default",":","None",")",".","kms_key","(","Optional","[","str","]",")",":","The","ARN","of","the","KMS","key","that","is","used","to","encrypt","the","data","on","the","storage","volume","attached","to","the","instance","hosting","the","endpoint",".","(","Default",":","None",")",".","wait","(","Optional","[","bool","]",")",":","Whether","the","call","should","wait","until","the","deployment","of","this","model","completes",".","(","Default",":","True",")",".","data_capture_config","(","Optional","[","sagemaker.model_monitor.DataCaptureConfig","]",")",":","Specifies","configuration","related","to","Endpoint","data","capture","for","use","with","Amazon","SageMaker","Model","Monitoring",".","(","Default",":","None",")",".","async_inference_config","(","Optional","[","sagemaker.model_monitor.AsyncInferenceConfig","]",")",":","Specifies","configuration","related","to","async","endpoint",".","Use","this","configuration","when","trying","to","create","async","endpoint","and","make","async","inference",".","If","empty","config","object","passed","through",",","will","use","default","config","to","deploy","async","endpoint",".","Deploy","a","real-time","endpoint","if","it","'s","None",".","(","Default",":","None",")","serverless_inference_config","(","Optional","[","sagemaker.serverless.ServerlessInferenceConfig","]",")",":","Specifies","configuration","related","to","serverless","endpoint",".","Use","this","configuration","when","trying","to","create","serverless","endpoint","and","make","serverless","inference",".","If","empty","object","passed","through",",","will","use","pre-defined","values","in","``","ServerlessInferenceConfig","``","class","to","deploy","serverless","endpoint",".","Deploy","an","instance","based","endpoint","if","it","'s","None",".","(","Default",":","None",")","volume_size","(","Optional","[","int","]",")",":","The","size",",","in","GB",",","of","the","ML","storage","volume","attached","to","individual","inference","instance","associated","with","the","production","variant",".","Currenly","only","Amazon","EBS","gp2","storage","volumes","are","supported",".","(","Default",":","None",")",".","model_data_download_timeout","(","Optional","[","int","]",")",":","The","timeout","value",",","in","seconds",",","to","download","and","extract","model","data","from","Amazon","S3","to","the","individual","inference","instance","associated","with","this","production","variant",".","(","Default",":","None",")",".","container_startup_health_check_timeout","(","Optional","[","int","]",")",":","The","timeout","value",",","in","seconds",",","for","your","inference","container","to","pass","health","check","by","SageMaker","Hosting",".","For","more","information","about","health","check","see",":","https",":","\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/your-algorithms-inference-code.html","#","your-algorithms-inference-algo-ping-requests","(","Default",":","None",")",".","inference_recommendation_id","(","Optional","[","str","]",")",":","The","recommendation","id","which","specifies","the","recommendation","you","picked","from","inference","recommendation","job","results","and","would","like","to","deploy","the","model","and","endpoint","with","recommended","parameters",".","(","Default",":","None",")",".","explainer_config","(","Optional","[","sagemaker.explainer.ExplainerConfig","]",")",":","Specifies","online","explainability","configuration","for","use","with","Amazon","SageMaker","Clarify",".","(","Default",":","None",")",".","accept_eula","(","bool",")",":","For","models","that","require","a","Model","Access","Config",",","specify","True","or","False","to","indicate","whether","model","terms","of","use","have","been","accepted",".","The","`","accept_eula","`","value","must","be","explicitly","defined","as","`","True","`","in","order","to","accept","the","end-user","license","agreement","(","EULA",")","that","some","models","require",".","(","Default",":","None",")",".","endpoint_logging","(","Optiona","[","bool","]",")",":","If","set","to","true",",","live","logging","will","be","emitted","as","the","SageMaker","Endpoint","starts","up",".","(","Default",":","False",")",".","resources","(","Optional","[","ResourceRequirements","]",")",":","The","compute","resource","requirements","for","a","model","to","be","deployed","to","an","endpoint",".","Only","EndpointType.INFERENCE_COMPONENT_BASED","supports","this","feature",".","(","Default",":","None",")",".","managed_instance_scaling","(","Optional","[","Dict","]",")",":","Managed","intance","scaling","options",",","if","configured","Amazon","SageMaker","will","manage","the","instance","number","behind","the","endpoint",".","endpoint_type","(","EndpointType",")",":","The","type","of","endpoint","used","to","deploy","models",".","(","Default",":","EndpointType.MODEL_BASED",")","."]
code: def deploy(
      self,
      initial_instance_count: Optional[int] = None,
      instance_type: Optional[str] = None,
      serializer: Optional[BaseSerializer] = None,
      deserializer: Optional[BaseDeserializer] = None,
      accelerator_type: Optional[str] = None,
      endpoint_name: Optional[str] = None,
      tags: Optional[Tags] = None,
      kms_key: Optional[str] = None,
      wait: Optional[bool] = True,
      data_capture_config: Optional[DataCaptureConfig] = None,
      async_inference_config: Optional[AsyncInferenceConfig] = None,
      serverless_inference_config: Optional[
          ServerlessInferenceConfig
      ] = None,
      volume_size: Optional[int] = None,
      model_data_download_timeout: Optional[int] = None,
      container_startup_health_check_timeout: Optional[int] = None,
      inference_recommendation_id: Optional[str] = None,
      explainer_config: Optional[ExplainerConfig] = None,
      accept_eula: Optional[bool] = None,
      endpoint_logging: Optional[bool] = False,
      resources: Optional[ResourceRequirements] = None,
      managed_instance_scaling: Optional[str] = None,
      endpoint_type: EndpointType = EndpointType.MODEL_BASED,
  ) -> PredictorBase:
      """Creates endpoint by calling base ``Model`` class `deploy` method.
  
      Create a SageMaker ``Model`` and ``EndpointConfig``, and deploy an
      ``Endpoint`` from this ``Model``.
  
      Any field set to ``None`` does not get passed to the parent class method.
  
  
      Args:
          initial_instance_count (Optional[int]): The initial number of instances to run
              in the ``Endpoint`` created from this ``Model``. If not using
              serverless inference or the model has not called ``right_size()``,
              then it need to be a number larger or equals
              to 1. (Default: None)
          instance_type (Optional[str]): The EC2 instance type to deploy this Model to.
              For example, 'ml.p2.xlarge', or 'local' for local mode. If not using
              serverless inference or the model has not called ``right_size()``,
              then it is required to deploy a model.
              (Default: None)
          serializer (Optional[:class:`~sagemaker.serializers.BaseSerializer`]): A
              serializer object, used to encode data for an inference endpoint
              (Default: None). If ``serializer`` is not None, then
              ``serializer`` will override the default serializer. The
              default serializer is set by the ``predictor_cls``. (Default: None).
          deserializer (Optional[:class:`~sagemaker.deserializers.BaseDeserializer`]): A
              deserializer object, used to decode data from an inference
              endpoint (Default: None). If ``deserializer`` is not None, then
              ``deserializer`` will override the default deserializer. The
              default deserializer is set by the ``predictor_cls``. (Default: None).
          accelerator_type (Optional[str]): Type of Elastic Inference accelerator to
              deploy this model for model loading and inference, for example,
              'ml.eia1.medium'. If not specified, no Elastic Inference
              accelerator will be attached to the endpoint. For more
              information:
              https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html
              (Default: None).
          endpoint_name (Optional[str]): The name of the endpoint to create (default:
              None). If not specified, a unique endpoint name will be created.
              (Default: None).
          tags (Optional[Tags]): Tags to attach to this
              specific endpoint. (Default: None).
          kms_key (Optional[str]): The ARN of the KMS key that is used to encrypt the
              data on the storage volume attached to the instance hosting the
              endpoint. (Default: None).
          wait (Optional[bool]): Whether the call should wait until the deployment of
              this model completes. (Default: True).
          data_capture_config (Optional[sagemaker.model_monitor.DataCaptureConfig]): Specifies
              configuration related to Endpoint data capture for use with
              Amazon SageMaker Model Monitoring. (Default: None).
          async_inference_config (Optional[sagemaker.model_monitor.AsyncInferenceConfig]):
              Specifies configuration related to async endpoint. Use this configuration when
              trying to create async endpoint and make async inference. If empty config object
              passed through, will use default config to deploy async endpoint. Deploy a
              real-time endpoint if it's None. (Default: None)
          serverless_inference_config (Optional[sagemaker.serverless.ServerlessInferenceConfig]):
              Specifies configuration related to serverless endpoint. Use this configuration
              when trying to create serverless endpoint and make serverless inference. If
              empty object passed through, will use pre-defined values in
              ``ServerlessInferenceConfig`` class to deploy serverless endpoint. Deploy an
              instance based endpoint if it's None. (Default: None)
          volume_size (Optional[int]): The size, in GB, of the ML storage volume attached to
              individual inference instance associated with the production variant. Currenly only
              Amazon EBS gp2 storage volumes are supported. (Default: None).
          model_data_download_timeout (Optional[int]): The timeout value, in seconds, to download
              and extract model data from Amazon S3 to the individual inference instance
              associated with this production variant. (Default: None).
          container_startup_health_check_timeout (Optional[int]): The timeout value, in seconds,
              for your inference container to pass health check by SageMaker Hosting. For more
              information about health check see:
              https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms-inference-code.html#your-algorithms-inference-algo-ping-requests
              (Default: None).
          inference_recommendation_id (Optional[str]): The recommendation id which specifies the
              recommendation you picked from inference recommendation job results and
              would like to deploy the model and endpoint with recommended parameters.
              (Default: None).
          explainer_config (Optional[sagemaker.explainer.ExplainerConfig]): Specifies online
              explainability configuration for use with Amazon SageMaker Clarify. (Default: None).
          accept_eula (bool): For models that require a Model Access Config, specify True or
              False to indicate whether model terms of use have been accepted.
              The `accept_eula` value must be explicitly defined as `True` in order to
              accept the end-user license agreement (EULA) that some
              models require. (Default: None).
          endpoint_logging (Optiona[bool]): If set to true, live logging will be emitted as
              the SageMaker Endpoint starts up. (Default: False).
          resources (Optional[ResourceRequirements]): The compute resource requirements
              for a model to be deployed to an endpoint. Only
              EndpointType.INFERENCE_COMPONENT_BASED supports this feature.
              (Default: None).
          managed_instance_scaling (Optional[Dict]): Managed intance scaling options,
              if configured Amazon SageMaker will manage the instance number behind the
              endpoint.
          endpoint_type (EndpointType): The type of endpoint used to deploy models.
              (Default: EndpointType.MODEL_BASED).
      """
  
      deploy_kwargs = get_deploy_kwargs(
          model_id=self.model_id,
          model_version=self.model_version,
          region=self.region,
          tolerate_deprecated_model=self.tolerate_deprecated_model,
          tolerate_vulnerable_model=self.tolerate_vulnerable_model,
          initial_instance_count=initial_instance_count,
          instance_type=instance_type or self.instance_type,
          serializer=serializer,
          deserializer=deserializer,
          accelerator_type=accelerator_type,
          endpoint_name=endpoint_name,
          tags=format_tags(tags),
          kms_key=kms_key,
          wait=wait,
          data_capture_config=data_capture_config,
          async_inference_config=async_inference_config,
          serverless_inference_config=serverless_inference_config,
          volume_size=volume_size,
          model_data_download_timeout=model_data_download_timeout,
          container_startup_health_check_timeout=container_startup_health_check_timeout,
          inference_recommendation_id=inference_recommendation_id,
          explainer_config=explainer_config,
          sagemaker_session=self.sagemaker_session,
          accept_eula=accept_eula,
          endpoint_logging=endpoint_logging,
          resources=resources,
          managed_instance_scaling=managed_instance_scaling,
          endpoint_type=endpoint_type,
      )
  
      predictor = super(JumpStartModel, self).deploy(
          **deploy_kwargs.to_kwargs_dict()
      )
  
      # If no predictor class was passed, add defaults to predictor
      if (
          self.orig_predictor_cls is None
          and async_inference_config is None
      ):
          return get_default_predictor(
              predictor=predictor,
              model_id=self.model_id,
              model_version=self.model_version,
              region=self.region,
              tolerate_deprecated_model=self.tolerate_deprecated_model,
              tolerate_vulnerable_model=self.tolerate_vulnerable_model,
              sagemaker_session=self.sagemaker_session,
          )
  
      # If a predictor class was passed, do not mutate predictor
      return predictor
  
imports: from __future__ import absolute_import
  from typing import Dict, List, Optional, Union
  from sagemaker import payloads
  from sagemaker.async_inference.async_inference_config import AsyncInferenceConfig
  from sagemaker.base_deserializers import BaseDeserializer
  from sagemaker.base_serializers import BaseSerializer
  from sagemaker.explainer.explainer_config import ExplainerConfig
  from sagemaker.jumpstart.accessors import JumpStartModelsAccessor
  from sagemaker.jumpstart.enums import JumpStartScriptScope
  from sagemaker.jumpstart.exceptions import INVALID_MODEL_ID_ERROR_MSG
  from sagemaker.jumpstart.factory.model import get_default_predictor, get_deploy_kwargs, get_init_kwargs, get_register_kwargs
  from sagemaker.jumpstart.types import JumpStartSerializablePayload
  from sagemaker.jumpstart.utils import is_valid_model_id
  from sagemaker.utils import stringify_object, format_tags, Tags
  from sagemaker.model import Model, ModelPackage
  from sagemaker.model_monitor.data_capture_config import DataCaptureConfig
  from sagemaker.predictor import PredictorBase
  from sagemaker.serverless.serverless_inference_config import ServerlessInferenceConfig
  from sagemaker.session import Session
  from sagemaker.workflow.entities import PipelineVariable
  from sagemaker.model_metrics import ModelMetrics
  from sagemaker.metadata_properties import MetadataProperties
  from sagemaker.drift_check_baselines import DriftCheckBaselines
  from sagemaker.compute_resource_requirements.resource_requirements import ResourceRequirements
  from sagemaker.enums import EndpointType
label_desc: Use image node_id 5 for calling the JumpStartModel obj's underlying member method code with example usage: obj.deploy(initial_instance_count, instance_type, serializer, deserializer, accelerator_type, endpoint_name, tags, kms_key, wait, data_capture_config, async_inference_config, serverless_inference_config, volume_size, model_data_download_timeout, container_startup_health_check_timeout, inference_recommendation_id, explainer_config, accept_eula, endpoint_logging, resources, managed_instance_scaling, endpoint_type) and returns: predictor, get_default_predictor