class_docstr: JumpStartEstimator class.
  
  This class sets defaults based on the model ID and version.
docstr: Creates endpoint from training job.
  
  Calls base ``Estimator`` class ``deploy`` method.
  
  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).
      image_uri (Optional[Union[str, PipelineVariable]]): A Docker image URI. (Default: None).
      role (Optional[str]): An AWS IAM role (either name or full ARN). The Amazon
          SageMaker training jobs and APIs that create Amazon SageMaker
          endpoints use this role to access training data and model
          artifacts. After the endpoint is created, the inference code
          might use the IAM role if it needs to access some AWS resources.
          It can be null if this is being used to create a Model to pass
          to a ``PipelineModel`` which has its own Role field. (Default:
          None).
      predictor_cls (Optional[callable[string, sagemaker.session.Session]]): A
          function to call to create a predictor (Default: None). If not
          None, ``deploy`` will return the result of invoking this
          function on the created endpoint name. (Default: None).
      env (Optional[dict[str, str] or dict[str, PipelineVariable]]): Environment variables
          to run with ``image_uri`` when hosted in SageMaker. (Default: None).
      model_name (Optional[str]): The model name. If None, a default model name will be
          selected on each ``deploy``. (Default: None).
      vpc_config (Optional[Union[dict[str, list[str]],dict[str, list[PipelineVariable]]]]):
          The VpcConfig set on the model (Default: None)
          * 'Subnets' (list[str]): List of subnet ids.
          * 'SecurityGroupIds' (list[str]): List of security group ids. (Default: None).
      sagemaker_session (Optional[sagemaker.session.Session]): A SageMaker Session
          object, used for SageMaker interactions (Default: None). If not
          specified, one is created using the default AWS configuration
          chain. (Default: None).
      enable_network_isolation (Optional[Union[bool, PipelineVariable]]): If True,
          enables network isolation in the endpoint, isolating the model
          container. No inbound or outbound network calls can be made to
          or from the model container. (Default: None).
      model_kms_key (Optional[str]): KMS key ARN used to encrypt the repacked
          model archive file if the model is repacked. (Default: None).
      image_config (Optional[Union[dict[str, str], dict[str, PipelineVariable]]]): Specifies
          whether the image of model container is pulled from ECR, or private
          registry in your VPC. By default it is set to pull model container
          image from ECR. (Default: None).
      source_dir (Optional[str]): The absolute, relative, or S3 URI Path to a directory
          with any other training source code dependencies aside from the entry
          point file (Default: None). If ``source_dir`` is an S3 URI, it must
          point to a tar.gz file. Structure within this directory is preserved
          when training on Amazon SageMaker. If 'git_config' is provided,
          'source_dir' should be a relative location to a directory in the Git repo.
          If the directory points to S3, no code is uploaded and the S3 location
          is used instead. (Default: None).
  
          .. admonition:: Example
  
              With the following GitHub repo directory structure:
  
              >>> |----- README.md
              >>> |----- src
              >>>         |----- inference.py
              >>>         |----- test.py
  
              You can assign entry_point='inference.py', source_dir='src'.
      code_location (Optional[str]): Name of the S3 bucket where custom code is
          uploaded (Default: None). If not specified, the default bucket
          created by ``sagemaker.session.Session`` is used. (Default: None).
      entry_point (Optional[str]): The absolute or relative path to the local Python
          source file that should be executed as the entry point to
          model hosting. (Default: None). If ``source_dir`` is specified, then ``entry_point``
          must point to a file located at the root of ``source_dir``.
          If 'git_config' is provided, 'entry_point' should be
          a relative location to the Python source file in the Git repo.
  
          Example:
              With the following GitHub repo directory structure:
  
              >>> |----- README.md
              >>> |----- src
              >>>         |----- inference.py
              >>>         |----- test.py
  
              You can assign entry_point='src/inference.py'.
  
          (Default: None).
      container_log_level (Optional[Union[int, PipelineVariable]]): Log level to use within
          the container. Valid values are defined in the Python logging module.
          (Default: None).
      dependencies (Optional[list[str]]): A list of absolute or relative paths to directories
          with any additional libraries that should be exported
          to the container (default: []). The library folders are
          copied to SageMaker in the same folder where the entrypoint is
          copied. If 'git_config' is provided, 'dependencies' should be a
          list of relative locations to directories with any additional
          libraries needed in the Git repo. If the ```source_dir``` points
          to S3, code will be uploaded and the S3 location will be used
          instead.
  
          .. admonition:: Example
  
              The following call
  
              >>> Model(entry_point='inference.py',
              ...       dependencies=['my/libs/common', 'virtual-env'])
  
              results in the following structure inside the container:
  
              >>> $ ls
  
              >>> opt/ml/code
              >>>     |------ inference.py
              >>>     |------ common
              >>>     |------ virtual-env
  
          This is not supported with "local code" in Local Mode.
          (Default: None).
      git_config (Optional[dict[str, str]]): Git configurations used for cloning
          files, including ``repo``, ``branch``, ``commit``,
          ``2FA_enabled``, ``username``, ``password`` and ``token``. The
          ``repo`` field is required. All other fields are optional.
          ``repo`` specifies the Git repository where your training script
          is stored. If you don't provide ``branch``, the default value
          'master' is used. If you don't provide ``commit``, the latest
          commit in the specified branch is used.
  
          .. admonition:: Example
  
              The following config:
  
              >>> git_config = {'repo': 'https://github.com/aws/sagemaker-python-sdk.git',
              >>>               'branch': 'test-branch-git-config',
              >>>               'commit': '329bfcf884482002c05ff7f44f62599ebc9f445a'}
  
              results in cloning the repo specified in 'repo', then
              checking out the 'master' branch, and checking out the specified
              commit.
  
          ``2FA_enabled``, ``username``, ``password`` and ``token`` are
          used for authentication. For GitHub (or other Git) accounts, set
          ``2FA_enabled`` to 'True' if two-factor authentication is
          enabled for the account, otherwise set it to 'False'. If you do
          not provide a value for ``2FA_enabled``, a default value of
          'False' is used. CodeCommit does not support two-factor
          authentication, so do not provide "2FA_enabled" with CodeCommit
          repositories.
  
          For GitHub and other Git repos, when SSH URLs are provided, it
          doesn't matter whether 2FA is enabled or disabled. You should
          either have no passphrase for the SSH key pairs or have the
          ssh-agent configured so that you will not be prompted for the SSH
          passphrase when you run the 'git clone' command with SSH URLs. When
          HTTPS URLs are provided, if 2FA is disabled, then either ``token``
          or ``username`` and ``password`` are be used for authentication if provided.
          ``Token`` is prioritized. If 2FA is enabled, only ``token`` is used
          for authentication if provided. If required authentication info
          is not provided, the SageMaker Python SDK attempts to use local credentials
          to authenticate. If that fails, an error message is thrown.
  
          For CodeCommit repos, 2FA is not supported, so ``2FA_enabled``
          should not be provided. There is no token in CodeCommit, so
          ``token`` should also not be provided. When ``repo`` is an SSH URL,
          the requirements are the same as GitHub  repos. When ``repo``
          is an HTTPS URL, ``username`` and ``password`` are used for
          authentication if they are provided. If they are not provided,
          the SageMaker Python SDK attempts to use either the CodeCommit
          credential helper or local credential storage for authentication.
          (Default: None).
      use_compiled_model (bool): Flag to select whether to use compiled
          (optimized) model. (Default: False).
docstr_tok: ["Creates","endpoint","from","training","job",".","Calls","base","``","Estimator","``","class","``","deploy","``","method",".","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",")",".","image_uri","(","Optional","[","Union","[","str",",","PipelineVariable","]","]",")",":","A","Docker","image","URI",".","(","Default",":","None",")",".","role","(","Optional","[","str","]",")",":","An","AWS","IAM","role","(","either","name","or","full","ARN",")",".","The","Amazon","SageMaker","training","jobs","and","APIs","that","create","Amazon","SageMaker","endpoints","use","this","role","to","access","training","data","and","model","artifacts",".","After","the","endpoint","is","created",",","the","inference","code","might","use","the","IAM","role","if","it","needs","to","access","some","AWS","resources",".","It","can","be","null","if","this","is","being","used","to","create","a","Model","to","pass","to","a","``","PipelineModel","``","which","has","its","own","Role","field",".","(","Default",":","None",")",".","predictor_cls","(","Optional","[","callable","[","string",",","sagemaker.session.Session","]","]",")",":","A","function","to","call","to","create","a","predictor","(","Default",":","None",")",".","If","not","None",",","``","deploy","``","will","return","the","result","of","invoking","this","function","on","the","created","endpoint","name",".","(","Default",":","None",")",".","env","(","Optional","[","dict","[","str",",","str","]","or","dict","[","str",",","PipelineVariable","]","]",")",":","Environment","variables","to","run","with","``","image_uri","``","when","hosted","in","SageMaker",".","(","Default",":","None",")",".","model_name","(","Optional","[","str","]",")",":","The","model","name",".","If","None",",","a","default","model","name","will","be","selected","on","each","``","deploy","``",".","(","Default",":","None",")",".","vpc_config","(","Optional","[","Union","[","dict","[","str",",","list","[","str","]","]",",","dict","[","str",",","list","[","PipelineVariable","]","]","]","]",")",":","The","VpcConfig","set","on","the","model","(","Default",":","None",")","*","'Subnets","'","(","list","[","str","]",")",":","List","of","subnet","ids",".","*","'SecurityGroupIds","'","(","list","[","str","]",")",":","List","of","security","group","ids",".","(","Default",":","None",")",".","sagemaker_session","(","Optional","[","sagemaker.session.Session","]",")",":","A","SageMaker","Session","object",",","used","for","SageMaker","interactions","(","Default",":","None",")",".","If","not","specified",",","one","is","created","using","the","default","AWS","configuration","chain",".","(","Default",":","None",")",".","enable_network_isolation","(","Optional","[","Union","[","bool",",","PipelineVariable","]","]",")",":","If","True",",","enables","network","isolation","in","the","endpoint",",","isolating","the","model","container",".","No","inbound","or","outbound","network","calls","can","be","made","to","or","from","the","model","container",".","(","Default",":","None",")",".","model_kms_key","(","Optional","[","str","]",")",":","KMS","key","ARN","used","to","encrypt","the","repacked","model","archive","file","if","the","model","is","repacked",".","(","Default",":","None",")",".","image_config","(","Optional","[","Union","[","dict","[","str",",","str","]",",","dict","[","str",",","PipelineVariable","]","]","]",")",":","Specifies","whether","the","image","of","model","container","is","pulled","from","ECR",",","or","private","registry","in","your","VPC",".","By","default","it","is","set","to","pull","model","container","image","from","ECR",".","(","Default",":","None",")",".","source_dir","(","Optional","[","str","]",")",":","The","absolute",",","relative",",","or","S3","URI","Path","to","a","directory","with","any","other","training","source","code","dependencies","aside","from","the","entry","point","file","(","Default",":","None",")",".","If","``","source_dir","``","is","an","S3","URI",",","it","must","point","to","a","tar.gz","file",".","Structure","within","this","directory","is","preserved","when","training","on","Amazon","SageMaker",".","If","'git_config","'","is","provided",",","'source_dir","'","should","be","a","relative","location","to","a","directory","in","the","Git","repo",".","If","the","directory","points","to","S3",",","no","code","is","uploaded","and","the","S3","location","is","used","instead",".","(","Default",":","None",")",".","..","admonition",":",":","Example","With","the","following","GitHub","repo","directory","structure",":",">",">",">","|","--","--","-","README.md",">",">",">","|","--","--","-","src",">",">",">","|","--","--","-","inference.py",">",">",">","|","--","--","-","test.py","You","can","assign","entry_point='inference.py","'",",","source_dir='src","'",".","code_location","(","Optional","[","str","]",")",":","Name","of","the","S3","bucket","where","custom","code","is","uploaded","(","Default",":","None",")",".","If","not","specified",",","the","default","bucket","created","by","``","sagemaker.session.Session","``","is","used",".","(","Default",":","None",")",".","entry_point","(","Optional","[","str","]",")",":","The","absolute","or","relative","path","to","the","local","Python","source","file","that","should","be","executed","as","the","entry","point","to","model","hosting",".","(","Default",":","None",")",".","If","``","source_dir","``","is","specified",",","then","``","entry_point","``","must","point","to","a","file","located","at","the","root","of","``","source_dir","``",".","If","'git_config","'","is","provided",",","'entry_point","'","should","be","a","relative","location","to","the","Python","source","file","in","the","Git","repo",".","Example",":","With","the","following","GitHub","repo","directory","structure",":",">",">",">","|","--","--","-","README.md",">",">",">","|","--","--","-","src",">",">",">","|","--","--","-","inference.py",">",">",">","|","--","--","-","test.py","You","can","assign","entry_point='src\/inference.py","'",".","(","Default",":","None",")",".","container_log_level","(","Optional","[","Union","[","int",",","PipelineVariable","]","]",")",":","Log","level","to","use","within","the","container",".","Valid","values","are","defined","in","the","Python","logging","module",".","(","Default",":","None",")",".","dependencies","(","Optional","[","list","[","str","]","]",")",":","A","list","of","absolute","or","relative","paths","to","directories","with","any","additional","libraries","that","should","be","exported","to","the","container","(","default",":","[","]",")",".","The","library","folders","are","copied","to","SageMaker","in","the","same","folder","where","the","entrypoint","is","copied",".","If","'git_config","'","is","provided",",","'dependencies","'","should","be","a","list","of","relative","locations","to","directories","with","any","additional","libraries","needed","in","the","Git","repo",".","If","the","``","`","source_dir","``","`","points","to","S3",",","code","will","be","uploaded","and","the","S3","location","will","be","used","instead",".","..","admonition",":",":","Example","The","following","call",">",">",">","Model","(","entry_point='inference.py","'",",","...","dependencies=","[","'my\/libs\/common","'",",","'virtual-env","'","]",")","results","in","the","following","structure","inside","the","container",":",">",">",">","$","ls",">",">",">","opt\/ml\/code",">",">",">","|","--","--","--","inference.py",">",">",">","|","--","--","--","common",">",">",">","|","--","--","--","virtual-env","This","is","not","supported","with","``","local","code","''","in","Local","Mode",".","(","Default",":","None",")",".","git_config","(","Optional","[","dict","[","str",",","str","]","]",")",":","Git","configurations","used","for","cloning","files",",","including","``","repo","``",",","``","branch","``",",","``","commit","``",",","``","2FA_enabled","``",",","``","username","``",",","``","password","``","and","``","token","``",".","The","``","repo","``","field","is","required",".","All","other","fields","are","optional",".","``","repo","``","specifies","the","Git","repository","where","your","training","script","is","stored",".","If","you","do","n't","provide","``","branch","``",",","the","default","value","'master","'","is","used",".","If","you","do","n't","provide","``","commit","``",",","the","latest","commit","in","the","specified","branch","is","used",".","..","admonition",":",":","Example","The","following","config",":",">",">",">","git_config","=","{","'repo","'",":","'https",":","\/\/github.com\/aws\/sagemaker-python-sdk.git","'",",",">",">",">","'branch","'",":","'test-branch-git-config","'",",",">",">",">","'commit","'",":","'329bfcf884482002c05ff7f44f62599ebc9f445a","'","}","results","in","cloning","the","repo","specified","in","'repo","'",",","then","checking","out","the","'master","'","branch",",","and","checking","out","the","specified","commit",".","``","2FA_enabled","``",",","``","username","``",",","``","password","``","and","``","token","``","are","used","for","authentication",".","For","GitHub","(","or","other","Git",")","accounts",",","set","``","2FA_enabled","``","to","'True","'","if","two-factor","authentication","is","enabled","for","the","account",",","otherwise","set","it","to","'False","'",".","If","you","do","not","provide","a","value","for","``","2FA_enabled","``",",","a","default","value","of","'False","'","is","used",".","CodeCommit","does","not","support","two-factor","authentication",",","so","do","not","provide","``","2FA_enabled","''","with","CodeCommit","repositories",".","For","GitHub","and","other","Git","repos",",","when","SSH","URLs","are","provided",",","it","does","n't","matter","whether","2FA","is","enabled","or","disabled",".","You","should","either","have","no","passphrase","for","the","SSH","key","pairs","or","have","the","ssh-agent","configured","so","that","you","will","not","be","prompted","for","the","SSH","passphrase","when","you","run","the","'git","clone","'","command","with","SSH","URLs",".","When","HTTPS","URLs","are","provided",",","if","2FA","is","disabled",",","then","either","``","token","``","or","``","username","``","and","``","password","``","are","be","used","for","authentication","if","provided",".","``","Token","``","is","prioritized",".","If","2FA","is","enabled",",","only","``","token","``","is","used","for","authentication","if","provided",".","If","required","authentication","info","is","not","provided",",","the","SageMaker","Python","SDK","attempts","to","use","local","credentials","to","authenticate",".","If","that","fails",",","an","error","message","is","thrown",".","For","CodeCommit","repos",",","2FA","is","not","supported",",","so","``","2FA_enabled","``","should","not","be","provided",".","There","is","no","token","in","CodeCommit",",","so","``","token","``","should","also","not","be","provided",".","When","``","repo","``","is","an","SSH","URL",",","the","requirements","are","the","same","as","GitHub","repos",".","When","``","repo","``","is","an","HTTPS","URL",",","``","username","``","and","``","password","``","are","used","for","authentication","if","they","are","provided",".","If","they","are","not","provided",",","the","SageMaker","Python","SDK","attempts","to","use","either","the","CodeCommit","credential","helper","or","local","credential","storage","for","authentication",".","(","Default",":","None",")",".","use_compiled_model","(","bool",")",":","Flag","to","select","whether","to","use","compiled","(","optimized",")","model",".","(","Default",":","False",")","."]
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,
      image_uri: Optional[Union[str, PipelineVariable]] = None,
      role: Optional[str] = None,
      predictor_cls: Optional[callable] = None,
      env: Optional[Dict[str, Union[str, PipelineVariable]]] = None,
      model_name: Optional[str] = None,
      vpc_config: Optional[
          Dict[str, List[Union[str, PipelineVariable]]]
      ] = None,
      sagemaker_session: Optional[session.Session] = None,
      enable_network_isolation: Union[bool, PipelineVariable] = None,
      model_kms_key: Optional[str] = None,
      image_config: Optional[
          Dict[str, Union[str, PipelineVariable]]
      ] = None,
      source_dir: Optional[str] = None,
      code_location: Optional[str] = None,
      entry_point: Optional[str] = None,
      container_log_level: Optional[
          Union[int, PipelineVariable]
      ] = None,
      dependencies: Optional[List[str]] = None,
      git_config: Optional[Dict[str, str]] = None,
      use_compiled_model: bool = False,
  ) -> PredictorBase:
      """Creates endpoint from training job.
  
      Calls base ``Estimator`` class ``deploy`` method.
  
      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).
          image_uri (Optional[Union[str, PipelineVariable]]): A Docker image URI. (Default: None).
          role (Optional[str]): An AWS IAM role (either name or full ARN). The Amazon
              SageMaker training jobs and APIs that create Amazon SageMaker
              endpoints use this role to access training data and model
              artifacts. After the endpoint is created, the inference code
              might use the IAM role if it needs to access some AWS resources.
              It can be null if this is being used to create a Model to pass
              to a ``PipelineModel`` which has its own Role field. (Default:
              None).
          predictor_cls (Optional[callable[string, sagemaker.session.Session]]): A
              function to call to create a predictor (Default: None). If not
              None, ``deploy`` will return the result of invoking this
              function on the created endpoint name. (Default: None).
          env (Optional[dict[str, str] or dict[str, PipelineVariable]]): Environment variables
              to run with ``image_uri`` when hosted in SageMaker. (Default: None).
          model_name (Optional[str]): The model name. If None, a default model name will be
              selected on each ``deploy``. (Default: None).
          vpc_config (Optional[Union[dict[str, list[str]],dict[str, list[PipelineVariable]]]]):
              The VpcConfig set on the model (Default: None)
              * 'Subnets' (list[str]): List of subnet ids.
              * 'SecurityGroupIds' (list[str]): List of security group ids. (Default: None).
          sagemaker_session (Optional[sagemaker.session.Session]): A SageMaker Session
              object, used for SageMaker interactions (Default: None). If not
              specified, one is created using the default AWS configuration
              chain. (Default: None).
          enable_network_isolation (Optional[Union[bool, PipelineVariable]]): If True,
              enables network isolation in the endpoint, isolating the model
              container. No inbound or outbound network calls can be made to
              or from the model container. (Default: None).
          model_kms_key (Optional[str]): KMS key ARN used to encrypt the repacked
              model archive file if the model is repacked. (Default: None).
          image_config (Optional[Union[dict[str, str], dict[str, PipelineVariable]]]): Specifies
              whether the image of model container is pulled from ECR, or private
              registry in your VPC. By default it is set to pull model container
              image from ECR. (Default: None).
          source_dir (Optional[str]): The absolute, relative, or S3 URI Path to a directory
              with any other training source code dependencies aside from the entry
              point file (Default: None). If ``source_dir`` is an S3 URI, it must
              point to a tar.gz file. Structure within this directory is preserved
              when training on Amazon SageMaker. If 'git_config' is provided,
              'source_dir' should be a relative location to a directory in the Git repo.
              If the directory points to S3, no code is uploaded and the S3 location
              is used instead. (Default: None).
  
              .. admonition:: Example
  
                  With the following GitHub repo directory structure:
  
                  >>> |----- README.md
                  >>> |----- src
                  >>>         |----- inference.py
                  >>>         |----- test.py
  
                  You can assign entry_point='inference.py', source_dir='src'.
          code_location (Optional[str]): Name of the S3 bucket where custom code is
              uploaded (Default: None). If not specified, the default bucket
              created by ``sagemaker.session.Session`` is used. (Default: None).
          entry_point (Optional[str]): The absolute or relative path to the local Python
              source file that should be executed as the entry point to
              model hosting. (Default: None). If ``source_dir`` is specified, then ``entry_point``
              must point to a file located at the root of ``source_dir``.
              If 'git_config' is provided, 'entry_point' should be
              a relative location to the Python source file in the Git repo.
  
              Example:
                  With the following GitHub repo directory structure:
  
                  >>> |----- README.md
                  >>> |----- src
                  >>>         |----- inference.py
                  >>>         |----- test.py
  
                  You can assign entry_point='src/inference.py'.
  
              (Default: None).
          container_log_level (Optional[Union[int, PipelineVariable]]): Log level to use within
              the container. Valid values are defined in the Python logging module.
              (Default: None).
          dependencies (Optional[list[str]]): A list of absolute or relative paths to directories
              with any additional libraries that should be exported
              to the container (default: []). The library folders are
              copied to SageMaker in the same folder where the entrypoint is
              copied. If 'git_config' is provided, 'dependencies' should be a
              list of relative locations to directories with any additional
              libraries needed in the Git repo. If the ```source_dir``` points
              to S3, code will be uploaded and the S3 location will be used
              instead.
  
              .. admonition:: Example
  
                  The following call
  
                  >>> Model(entry_point='inference.py',
                  ...       dependencies=['my/libs/common', 'virtual-env'])
  
                  results in the following structure inside the container:
  
                  >>> $ ls
  
                  >>> opt/ml/code
                  >>>     |------ inference.py
                  >>>     |------ common
                  >>>     |------ virtual-env
  
              This is not supported with "local code" in Local Mode.
              (Default: None).
          git_config (Optional[dict[str, str]]): Git configurations used for cloning
              files, including ``repo``, ``branch``, ``commit``,
              ``2FA_enabled``, ``username``, ``password`` and ``token``. The
              ``repo`` field is required. All other fields are optional.
              ``repo`` specifies the Git repository where your training script
              is stored. If you don't provide ``branch``, the default value
              'master' is used. If you don't provide ``commit``, the latest
              commit in the specified branch is used.
  
              .. admonition:: Example
  
                  The following config:
  
                  >>> git_config = {'repo': 'https://github.com/aws/sagemaker-python-sdk.git',
                  >>>               'branch': 'test-branch-git-config',
                  >>>               'commit': '329bfcf884482002c05ff7f44f62599ebc9f445a'}
  
                  results in cloning the repo specified in 'repo', then
                  checking out the 'master' branch, and checking out the specified
                  commit.
  
              ``2FA_enabled``, ``username``, ``password`` and ``token`` are
              used for authentication. For GitHub (or other Git) accounts, set
              ``2FA_enabled`` to 'True' if two-factor authentication is
              enabled for the account, otherwise set it to 'False'. If you do
              not provide a value for ``2FA_enabled``, a default value of
              'False' is used. CodeCommit does not support two-factor
              authentication, so do not provide "2FA_enabled" with CodeCommit
              repositories.
  
              For GitHub and other Git repos, when SSH URLs are provided, it
              doesn't matter whether 2FA is enabled or disabled. You should
              either have no passphrase for the SSH key pairs or have the
              ssh-agent configured so that you will not be prompted for the SSH
              passphrase when you run the 'git clone' command with SSH URLs. When
              HTTPS URLs are provided, if 2FA is disabled, then either ``token``
              or ``username`` and ``password`` are be used for authentication if provided.
              ``Token`` is prioritized. If 2FA is enabled, only ``token`` is used
              for authentication if provided. If required authentication info
              is not provided, the SageMaker Python SDK attempts to use local credentials
              to authenticate. If that fails, an error message is thrown.
  
              For CodeCommit repos, 2FA is not supported, so ``2FA_enabled``
              should not be provided. There is no token in CodeCommit, so
              ``token`` should also not be provided. When ``repo`` is an SSH URL,
              the requirements are the same as GitHub  repos. When ``repo``
              is an HTTPS URL, ``username`` and ``password`` are used for
              authentication if they are provided. If they are not provided,
              the SageMaker Python SDK attempts to use either the CodeCommit
              credential helper or local credential storage for authentication.
              (Default: None).
          use_compiled_model (bool): Flag to select whether to use compiled
              (optimized) model. (Default: False).
      """
      self.orig_predictor_cls = predictor_cls
  
      sagemaker_session = sagemaker_session or self.sagemaker_session
      role = resolve_model_sagemaker_config_field(
          field_name="role",
          field_val=role,
          sagemaker_session=sagemaker_session,
          default_value=self.role,
      )
  
      estimator_deploy_kwargs = get_deploy_kwargs(
          model_id=self.model_id,
          model_version=self.model_version,
          region=self.region,
          tolerate_vulnerable_model=self.tolerate_vulnerable_model,
          tolerate_deprecated_model=self.tolerate_deprecated_model,
          initial_instance_count=initial_instance_count,
          instance_type=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,
          image_uri=image_uri,
          role=role,
          predictor_cls=predictor_cls,
          env=env,
          model_name=model_name,
          vpc_config=vpc_config,
          sagemaker_session=sagemaker_session,
          enable_network_isolation=enable_network_isolation,
          model_kms_key=model_kms_key,
          image_config=image_config,
          source_dir=source_dir,
          code_location=code_location,
          entry_point=entry_point,
          container_log_level=container_log_level,
          dependencies=dependencies,
          git_config=git_config,
          use_compiled_model=use_compiled_model,
          training_instance_type=self.instance_type,
      )
  
      predictor = super(JumpStartEstimator, self).deploy(
          **estimator_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 session
  from sagemaker.async_inference.async_inference_config import AsyncInferenceConfig
  from sagemaker.base_deserializers import BaseDeserializer
  from sagemaker.base_serializers import BaseSerializer
  from sagemaker.debugger.debugger import DebuggerHookConfig, RuleBase, TensorBoardOutputConfig
  from sagemaker.debugger.profiler_config import ProfilerConfig
  from sagemaker.estimator import Estimator
  from sagemaker.explainer.explainer_config import ExplainerConfig
  from sagemaker.inputs import FileSystemInput, TrainingInput
  from sagemaker.instance_group import InstanceGroup
  from sagemaker.jumpstart.accessors import JumpStartModelsAccessor
  from sagemaker.jumpstart.constants import DEFAULT_JUMPSTART_SAGEMAKER_SESSION
  from sagemaker.jumpstart.enums import JumpStartScriptScope
  from sagemaker.jumpstart.exceptions import INVALID_MODEL_ID_ERROR_MSG
  from sagemaker.jumpstart.factory.estimator import get_deploy_kwargs, get_fit_kwargs, get_init_kwargs
  from sagemaker.jumpstart.factory.model import get_default_predictor
  from sagemaker.jumpstart.utils import is_valid_model_id, resolve_model_sagemaker_config_field
  from sagemaker.utils import stringify_object, format_tags, Tags
  from sagemaker.model_monitor.data_capture_config import DataCaptureConfig
  from sagemaker.predictor import PredictorBase
  from sagemaker.serverless.serverless_inference_config import ServerlessInferenceConfig
  from sagemaker.workflow.entities import PipelineVariable
label_desc: Use image node_id 4 for calling the JumpStartEstimator 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, image_uri, role, predictor_cls, env, model_name, vpc_config, sagemaker_session, enable_network_isolation, model_kms_key, image_config, source_dir, code_location, entry_point, container_log_level, dependencies, git_config, use_compiled_model) and returns: predictor, get_default_predictor