class_docstr: An PyTorch SageMaker ``Model`` that can be deployed to a SageMaker ``Endpoint``.
class_docstr_tok: ["An","PyTorch","SageMaker","``","Model","``","that","can","be","deployed","to","a","SageMaker","``","Endpoint","``","."]
docstr: Create a URI for the serving image.
  
  Args:
      region_name (str): AWS region where the image is uploaded.
      instance_type (str): SageMaker instance type. Used to determine device type
          (cpu/gpu/family-specific optimized).
      accelerator_type (str): The Elastic Inference accelerator type to
          deploy to the instance for loading and making inferences to the
          model.
      serverless_inference_config (sagemaker.serverless.ServerlessInferenceConfig):
          Specifies configuration related to serverless endpoint. Instance type is
          not provided in serverless inference. So this is used to determine device type.
  
  Returns:
      str: The appropriate image URI based on the given parameters.
docstr_tok: ["Create","a","URI","for","the","serving","image",".","Args",":","region_name","(","str",")",":","AWS","region","where","the","image","is","uploaded",".","instance_type","(","str",")",":","SageMaker","instance","type",".","Used","to","determine","device","type","(","cpu\/gpu\/family-specific","optimized",")",".","accelerator_type","(","str",")",":","The","Elastic","Inference","accelerator","type","to","deploy","to","the","instance","for","loading","and","making","inferences","to","the","model",".","serverless_inference_config","(","sagemaker.serverless.ServerlessInferenceConfig",")",":","Specifies","configuration","related","to","serverless","endpoint",".","Instance","type","is","not","provided","in","serverless","inference",".","So","this","is","used","to","determine","device","type",".","Returns",":","str",":","The","appropriate","image","URI","based","on","the","given","parameters","."]
code: def serving_image_uri(
      self,
      region_name,
      instance_type,
      accelerator_type=None,
      serverless_inference_config=None,
  ):
      """Create a URI for the serving image.
  
      Args:
          region_name (str): AWS region where the image is uploaded.
          instance_type (str): SageMaker instance type. Used to determine device type
              (cpu/gpu/family-specific optimized).
          accelerator_type (str): The Elastic Inference accelerator type to
              deploy to the instance for loading and making inferences to the
              model.
          serverless_inference_config (sagemaker.serverless.ServerlessInferenceConfig):
              Specifies configuration related to serverless endpoint. Instance type is
              not provided in serverless inference. So this is used to determine device type.
  
      Returns:
          str: The appropriate image URI based on the given parameters.
  
      """
      return image_uris.retrieve(
          self._framework_name,
          region_name,
          version=self.framework_version,
          py_version=self.py_version,
          instance_type=instance_type,
          accelerator_type=accelerator_type,
          image_scope="inference",
          serverless_inference_config=serverless_inference_config,
      )
  
imports: from __future__ import absolute_import
  import logging
  from typing import Optional, Union, List, Dict
  import packaging.version
  import sagemaker
  from sagemaker import image_uris, ModelMetrics
  from sagemaker.deserializers import NumpyDeserializer
  from sagemaker.drift_check_baselines import DriftCheckBaselines
  from sagemaker.fw_utils import model_code_key_prefix, python_deprecation_warning, validate_version_or_image_args
  from sagemaker.metadata_properties import MetadataProperties
  from sagemaker.model import FrameworkModel, MODEL_SERVER_WORKERS_PARAM_NAME
  from sagemaker.pytorch import defaults
  from sagemaker.predictor import Predictor
  from sagemaker.serializers import NumpySerializer
  from sagemaker.utils import to_string
  from sagemaker.workflow import is_pipeline_variable
  from sagemaker.workflow.entities import PipelineVariable
label_desc: Use image node_id 4 for calling the PyTorchModel obj's underlying member method code with example usage: obj.serving_image_uri(region_name, instance_type, accelerator_type, serverless_inference_config) and returns: image_uris