class_docstr: A pipeline of SageMaker `Model` instances.
  
  This pipeline can be deployed as an `Endpoint` on SageMaker.
docstr: Initialize a SageMaker `Model` instance.
  
  The `Model` can be used to build an Inference Pipeline comprising of
  multiple model containers.
  
  Args:
      models (list[sagemaker.Model]): For using multiple containers to
          build an inference pipeline, you can pass a list of
          ``sagemaker.Model`` objects in the order you want the inference
          to happen.
      role (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 an AWS resource.
      predictor_cls (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.
      name (str): The model name. If None, a default model name will be
          selected on each ``deploy``.
      vpc_config (dict[str, list[str]] or 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.
      sagemaker_session (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.
      enable_network_isolation (bool or PipelineVariable): Default False. 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.Boolean
docstr_tok: ["Initialize","a","SageMaker","`","Model","`","instance",".","The","`","Model","`","can","be","used","to","build","an","Inference","Pipeline","comprising","of","multiple","model","containers",".","Args",":","models","(","list","[","sagemaker.Model","]",")",":","For","using","multiple","containers","to","build","an","inference","pipeline",",","you","can","pass","a","list","of","``","sagemaker.Model","``","objects","in","the","order","you","want","the","inference","to","happen",".","role","(","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","an","AWS","resource",".","predictor_cls","(","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",".","name","(","str",")",":","The","model","name",".","If","None",",","a","default","model","name","will","be","selected","on","each","``","deploy","``",".","vpc_config","(","dict","[","str",",","list","[","str","]","]","or","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",".","sagemaker_session","(","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",".","enable_network_isolation","(","bool","or","PipelineVariable",")",":","Default","False",".","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.Boolean"]
code: def __init__(
      self,
      models: List[Model],
      role: str = None,
      predictor_cls: Optional[callable] = None,
      name: Optional[str] = None,
      vpc_config: Optional[
          Dict[str, List[Union[str, PipelineVariable]]]
      ] = None,
      sagemaker_session: Optional[Session] = None,
      enable_network_isolation: Union[bool, PipelineVariable] = None,
  ):
      """Initialize a SageMaker `Model` instance.
  
      The `Model` can be used to build an Inference Pipeline comprising of
      multiple model containers.
  
      Args:
          models (list[sagemaker.Model]): For using multiple containers to
              build an inference pipeline, you can pass a list of
              ``sagemaker.Model`` objects in the order you want the inference
              to happen.
          role (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 an AWS resource.
          predictor_cls (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.
          name (str): The model name. If None, a default model name will be
              selected on each ``deploy``.
          vpc_config (dict[str, list[str]] or 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.
          sagemaker_session (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.
          enable_network_isolation (bool or PipelineVariable): Default False. 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.Boolean
      """
      self.models = models
      self.predictor_cls = predictor_cls
      self.name = name
      self.endpoint_name = None
      self.sagemaker_session = sagemaker_session
  
      # In case, sagemaker_session is None, get sagemaker_config from load_sagemaker_config()
      # to resolve value from config for the respective parameter
      self._sagemaker_config = (
          load_sagemaker_config()
          if (self.sagemaker_session is None)
          else None
      )
  
      self.role = resolve_value_from_config(
          role,
          MODEL_EXECUTION_ROLE_ARN_PATH,
          sagemaker_session=self.sagemaker_session,
          sagemaker_config=self._sagemaker_config,
      )
      self.vpc_config = resolve_value_from_config(
          vpc_config,
          MODEL_VPC_CONFIG_PATH,
          sagemaker_session=self.sagemaker_session,
          sagemaker_config=self._sagemaker_config,
      )
      self.enable_network_isolation = resolve_value_from_config(
          direct_input=enable_network_isolation,
          config_path=MODEL_ENABLE_NETWORK_ISOLATION_PATH,
          default_value=False,
          sagemaker_session=self.sagemaker_session,
          sagemaker_config=self._sagemaker_config,
      )
  
      if not self.role:
          # Originally IAM role was a required parameter.
          # Now we marked that as Optional because we can fetch it from SageMakerConfig
          # Because of marking that parameter as optional, we should validate if it is None, even
          # after fetching the config.
          raise ValueError(
              "An AWS IAM role is required to create a Pipeline Model."
          )
  
imports: from __future__ import absolute_import
  from typing import Optional, Dict, List, Union
  import sagemaker
  from sagemaker import ModelMetrics, Model
  from sagemaker.config import ENDPOINT_CONFIG_KMS_KEY_ID_PATH, MODEL_VPC_CONFIG_PATH, MODEL_ENABLE_NETWORK_ISOLATION_PATH, MODEL_EXECUTION_ROLE_ARN_PATH, load_sagemaker_config
  from sagemaker.drift_check_baselines import DriftCheckBaselines
  from sagemaker.metadata_properties import MetadataProperties
  from sagemaker.session import Session
  from sagemaker.utils import name_from_image, update_container_with_inference_params, resolve_value_from_config, format_tags
  from sagemaker.transformer import Transformer
  from sagemaker.workflow.entities import PipelineVariable
  from sagemaker.workflow.pipeline_context import runnable_by_pipeline
  from sagemaker.utils import instance_supports_kms
label_desc: Use image node_id 1 to create a new PipelineModel object from inherited base classes: object with example: obj = PipelineModel(models, role, predictor_cls, name, vpc_config, sagemaker_session, enable_network_isolation)