class_docstr: A DJL DeepSpeed SageMaker ``Model`` that can be deployed to a SageMaker ``Endpoint``
docstr: Partitions the model using SageMaker Training Job. This is a synchronous API call.
  
  Args:
      instance_type (str): The EC2 instance type to partition this Model.
              For example, 'ml.p4d.24xlarge'.
      s3_output_uri (str): S3 location for saving the training result (model
              artifacts and output files). If not specified, results are
              stored to a default bucket. If the bucket with the specific name
              does not exist, it will be created.
      s3_output_prefix (str): Name of the prefix where all the partitioned
              checkpoints to be uploaded. If not provided, the default value is
              aot-partitioned-checkpoints.
      job_name (str): Training job name. If not specified, a unique training job
                  name will be created.
      volume_size (int): Size in GB of the storage volume to use for
          storing input and output data during training (default: 30).
      volume_kms_key (str): Optional. KMS key ID for encrypting EBS
          volume attached to the training instance (default: None).
      output_kms_key (str): Optional. KMS key ID for encrypting the
          training output (default: None).
      use_spot_instances (bool): Specifies whether to use SageMaker
          Managed Spot instances for training. If enabled then the
          ``max_wait`` arg should also be set.
  
          More information:
          https://docs.aws.amazon.com/sagemaker/latest/dg/model-managed-spot-training.html
          (default: ``False``).
      max_wait (int): Timeout in seconds waiting for spot training
          job (default: None). After this amount of time Amazon
          SageMaker will stop waiting for managed spot training job to
          complete (default: None).
      enable_network_isolation (bool): Specifies whether container will
          run in network isolation mode (default: ``False``). Network
          isolation mode restricts the container access to outside networks
          (such as the Internet). The container does not make any inbound or
          outbound network calls. Also known as Internet-free mode.
  Returns:
      None
docstr_tok: ["Partitions","the","model","using","SageMaker","Training","Job",".","This","is","a","synchronous","API","call",".","Args",":","instance_type","(","str",")",":","The","EC2","instance","type","to","partition","this","Model",".","For","example",",","'ml.p4d.24xlarge","'",".","s3_output_uri","(","str",")",":","S3","location","for","saving","the","training","result","(","model","artifacts","and","output","files",")",".","If","not","specified",",","results","are","stored","to","a","default","bucket",".","If","the","bucket","with","the","specific","name","does","not","exist",",","it","will","be","created",".","s3_output_prefix","(","str",")",":","Name","of","the","prefix","where","all","the","partitioned","checkpoints","to","be","uploaded",".","If","not","provided",",","the","default","value","is","aot-partitioned-checkpoints",".","job_name","(","str",")",":","Training","job","name",".","If","not","specified",",","a","unique","training","job","name","will","be","created",".","volume_size","(","int",")",":","Size","in","GB","of","the","storage","volume","to","use","for","storing","input","and","output","data","during","training","(","default",":","30",")",".","volume_kms_key","(","str",")",":","Optional",".","KMS","key","ID","for","encrypting","EBS","volume","attached","to","the","training","instance","(","default",":","None",")",".","output_kms_key","(","str",")",":","Optional",".","KMS","key","ID","for","encrypting","the","training","output","(","default",":","None",")",".","use_spot_instances","(","bool",")",":","Specifies","whether","to","use","SageMaker","Managed","Spot","instances","for","training",".","If","enabled","then","the","``","max_wait","``","arg","should","also","be","set",".","More","information",":","https",":","\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/model-managed-spot-training.html","(","default",":","``","False","``",")",".","max_wait","(","int",")",":","Timeout","in","seconds","waiting","for","spot","training","job","(","default",":","None",")",".","After","this","amount","of","time","Amazon","SageMaker","will","stop","waiting","for","managed","spot","training","job","to","complete","(","default",":","None",")",".","enable_network_isolation","(","bool",")",":","Specifies","whether","container","will","run","in","network","isolation","mode","(","default",":","``","False","``",")",".","Network","isolation","mode","restricts","the","container","access","to","outside","networks","(","such","as","the","Internet",")",".","The","container","does","not","make","any","inbound","or","outbound","network","calls",".","Also","known","as","Internet-free","mode",".","Returns",":","None"]
code: def partition(
      self,
      instance_type: str,
      s3_output_uri: str = None,
      s3_output_prefix: str = "aot-partitioned-checkpoints",
      job_name: Optional[str] = None,
      volume_size: int = 30,
      volume_kms_key: Optional[str] = None,
      output_kms_key: Optional[str] = None,
      use_spot_instances: bool = False,
      max_wait: int = None,
      enable_network_isolation: bool = False,
  ):
      """Partitions the model using SageMaker Training Job. This is a synchronous API call.
  
      Args:
          instance_type (str): The EC2 instance type to partition this Model.
                  For example, 'ml.p4d.24xlarge'.
          s3_output_uri (str): S3 location for saving the training result (model
                  artifacts and output files). If not specified, results are
                  stored to a default bucket. If the bucket with the specific name
                  does not exist, it will be created.
          s3_output_prefix (str): Name of the prefix where all the partitioned
                  checkpoints to be uploaded. If not provided, the default value is
                  aot-partitioned-checkpoints.
          job_name (str): Training job name. If not specified, a unique training job
                      name will be created.
          volume_size (int): Size in GB of the storage volume to use for
              storing input and output data during training (default: 30).
          volume_kms_key (str): Optional. KMS key ID for encrypting EBS
              volume attached to the training instance (default: None).
          output_kms_key (str): Optional. KMS key ID for encrypting the
              training output (default: None).
          use_spot_instances (bool): Specifies whether to use SageMaker
              Managed Spot instances for training. If enabled then the
              ``max_wait`` arg should also be set.
  
              More information:
              https://docs.aws.amazon.com/sagemaker/latest/dg/model-managed-spot-training.html
              (default: ``False``).
          max_wait (int): Timeout in seconds waiting for spot training
              job (default: None). After this amount of time Amazon
              SageMaker will stop waiting for managed spot training job to
              complete (default: None).
          enable_network_isolation (bool): Specifies whether container will
              run in network isolation mode (default: ``False``). Network
              isolation mode restricts the container access to outside networks
              (such as the Internet). The container does not make any inbound or
              outbound network calls. Also known as Internet-free mode.
      Returns:
          None
      """
  
      super(DeepSpeedModel, self).partition(
          instance_type,
          s3_output_uri,
          s3_output_prefix=s3_output_prefix,
          job_name=job_name,
          volume_size=volume_size,
          volume_kms_key=volume_kms_key,
          output_kms_key=output_kms_key,
          use_spot_instances=use_spot_instances,
          max_wait=max_wait,
          enable_network_isolation=enable_network_isolation,
      )
  
      self.checkpoint = "ds_inference_config.json"
  
imports: from __future__ import absolute_import
  import json
  import logging
  import os.path
  import urllib.request
  from json import JSONDecodeError
  from urllib.error import HTTPError, URLError
  from enum import Enum
  from typing import Optional, Union, Dict, Any, List
  import sagemaker
  from sagemaker import s3, Predictor, image_uris, fw_utils
  from sagemaker.deserializers import JSONDeserializer, BaseDeserializer
  from sagemaker.djl_inference import defaults
  from sagemaker.model import FrameworkModel
  from sagemaker.s3_utils import s3_path_join
  from sagemaker.serializers import JSONSerializer, BaseSerializer
  from sagemaker.session import Session
  from sagemaker.utils import _tmpdir, _create_or_update_code_dir, format_tags
  from sagemaker.workflow.entities import PipelineVariable
  from sagemaker.estimator import Estimator
  from sagemaker.s3 import S3Uploader
label_desc: Use image node_id 3 for calling the DeepSpeedModel obj's underlying member method code with example usage: obj.partition(instance_type, s3_output_uri, s3_output_prefix, job_name, volume_size, volume_kms_key, output_kms_key, use_spot_instances, max_wait, enable_network_isolation) without return types