class_docstr: Managing interactions with SageMaker APIs and AWS services needed under Pipeline Context
  
  This class inherits the SageMaker session, it provides convenient methods
  for manipulating entities and resources that Amazon SageMaker uses,
  such as training jobs, endpoints, and input datasets in S3. When composing
  SageMaker Model-Building Pipeline, PipelineSession is recommended over
  regular SageMaker Session
class_docstr_tok: ["Managing","interactions","with","SageMaker","APIs","and","AWS","services","needed","under","Pipeline","Context","This","class","inherits","the","SageMaker","session",",","it","provides","convenient","methods","for","manipulating","entities","and","resources","that","Amazon","SageMaker","uses",",","such","as","training","jobs",",","endpoints",",","and","input","datasets","in","S3",".","When","composing","SageMaker","Model-Building","Pipeline",",","PipelineSession","is","recommended","over","regular","SageMaker","Session"]
docstr: Initialize a ``PipelineSession``.
  
  Args:
      boto_session (boto3.session.Session): The underlying Boto3 session which AWS service
          calls are delegated to (default: None). If not provided, one is created with
          default AWS configuration chain.
      sagemaker_client (boto3.SageMaker.Client): Client which makes Amazon SageMaker service
          calls other than ``InvokeEndpoint`` (default: None). Estimators created using this
          ``Session`` use this client. If not provided, one will be created using this
          instance's ``boto_session``.
      default_bucket (str): The default Amazon S3 bucket to be used by this session.
          This will be created the next time an Amazon S3 bucket is needed (by calling
          :func:`default_bucket`).
          If not provided, a default bucket will be created based on the following format:
          "sagemaker-{region}-{aws-account-id}".
          Example: "sagemaker-my-custom-bucket".
      settings (sagemaker.session_settings.SessionSettings): Optional. Set of optional
          parameters to apply to the session.
      sagemaker_config: A dictionary containing default values for the
          SageMaker Python SDK. (default: None). The dictionary must adhere to the schema
          defined at `~sagemaker.config.config_schema.SAGEMAKER_PYTHON_SDK_CONFIG_SCHEMA`.
          If sagemaker_config is not provided and configuration files exist (at the default
          paths for admins and users, or paths set through the environment variables
          SAGEMAKER_ADMIN_CONFIG_OVERRIDE and SAGEMAKER_USER_CONFIG_OVERRIDE),
          a new dictionary will be generated from those configuration files. Alternatively,
          this dictionary can be generated by calling
          :func:`~sagemaker.config.load_sagemaker_config` and then be provided to the
          Session.
      default_bucket_prefix (str): The default prefix to use for S3 Object Keys. When
          objects are saved to the Session's default_bucket, the Object Key used will
          start with the default_bucket_prefix. If not provided here or within
          sagemaker_config, no additional prefix will be added.
docstr_tok: ["Initialize","a","``","PipelineSession","``",".","Args",":","boto_session","(","boto3.session.Session",")",":","The","underlying","Boto3","session","which","AWS","service","calls","are","delegated","to","(","default",":","None",")",".","If","not","provided",",","one","is","created","with","default","AWS","configuration","chain",".","sagemaker_client","(","boto3.SageMaker.Client",")",":","Client","which","makes","Amazon","SageMaker","service","calls","other","than","``","InvokeEndpoint","``","(","default",":","None",")",".","Estimators","created","using","this","``","Session","``","use","this","client",".","If","not","provided",",","one","will","be","created","using","this","instance","'s","``","boto_session","``",".","default_bucket","(","str",")",":","The","default","Amazon","S3","bucket","to","be","used","by","this","session",".","This","will","be","created","the","next","time","an","Amazon","S3","bucket","is","needed","(","by","calling",":","func",":","`","default_bucket","`",")",".","If","not","provided",",","a","default","bucket","will","be","created","based","on","the","following","format",":","``","sagemaker-","{","region","}","-","{","aws-account-id","}","''",".","Example",":","``","sagemaker-my-custom-bucket","''",".","settings","(","sagemaker.session_settings.SessionSettings",")",":","Optional",".","Set","of","optional","parameters","to","apply","to","the","session",".","sagemaker_config",":","A","dictionary","containing","default","values","for","the","SageMaker","Python","SDK",".","(","default",":","None",")",".","The","dictionary","must","adhere","to","the","schema","defined","at","`","~sagemaker.config.config_schema.SAGEMAKER_PYTHON_SDK_CONFIG_SCHEMA","`",".","If","sagemaker_config","is","not","provided","and","configuration","files","exist","(","at","the","default","paths","for","admins","and","users",",","or","paths","set","through","the","environment","variables","SAGEMAKER_ADMIN_CONFIG_OVERRIDE","and","SAGEMAKER_USER_CONFIG_OVERRIDE",")",",","a","new","dictionary","will","be","generated","from","those","configuration","files",".","Alternatively",",","this","dictionary","can","be","generated","by","calling",":","func",":","`","~sagemaker.config.load_sagemaker_config","`","and","then","be","provided","to","the","Session",".","default_bucket_prefix","(","str",")",":","The","default","prefix","to","use","for","S3","Object","Keys",".","When","objects","are","saved","to","the","Session","'s","default_bucket",",","the","Object","Key","used","will","start","with","the","default_bucket_prefix",".","If","not","provided","here","or","within","sagemaker_config",",","no","additional","prefix","will","be","added","."]
code: def __init__(
      self,
      boto_session=None,
      sagemaker_client=None,
      default_bucket=None,
      settings=SessionSettings(),
      sagemaker_config: dict = None,
      default_bucket_prefix: str = None,
  ):
      """Initialize a ``PipelineSession``.
  
      Args:
          boto_session (boto3.session.Session): The underlying Boto3 session which AWS service
              calls are delegated to (default: None). If not provided, one is created with
              default AWS configuration chain.
          sagemaker_client (boto3.SageMaker.Client): Client which makes Amazon SageMaker service
              calls other than ``InvokeEndpoint`` (default: None). Estimators created using this
              ``Session`` use this client. If not provided, one will be created using this
              instance's ``boto_session``.
          default_bucket (str): The default Amazon S3 bucket to be used by this session.
              This will be created the next time an Amazon S3 bucket is needed (by calling
              :func:`default_bucket`).
              If not provided, a default bucket will be created based on the following format:
              "sagemaker-{region}-{aws-account-id}".
              Example: "sagemaker-my-custom-bucket".
          settings (sagemaker.session_settings.SessionSettings): Optional. Set of optional
              parameters to apply to the session.
          sagemaker_config: A dictionary containing default values for the
              SageMaker Python SDK. (default: None). The dictionary must adhere to the schema
              defined at `~sagemaker.config.config_schema.SAGEMAKER_PYTHON_SDK_CONFIG_SCHEMA`.
              If sagemaker_config is not provided and configuration files exist (at the default
              paths for admins and users, or paths set through the environment variables
              SAGEMAKER_ADMIN_CONFIG_OVERRIDE and SAGEMAKER_USER_CONFIG_OVERRIDE),
              a new dictionary will be generated from those configuration files. Alternatively,
              this dictionary can be generated by calling
              :func:`~sagemaker.config.load_sagemaker_config` and then be provided to the
              Session.
          default_bucket_prefix (str): The default prefix to use for S3 Object Keys. When
              objects are saved to the Session's default_bucket, the Object Key used will
              start with the default_bucket_prefix. If not provided here or within
              sagemaker_config, no additional prefix will be added.
      """
      super().__init__(
          boto_session=boto_session,
          sagemaker_client=sagemaker_client,
          default_bucket=default_bucket,
          settings=settings,
          sagemaker_config=sagemaker_config,
          default_bucket_prefix=default_bucket_prefix,
      )
      self._context = None
  
imports: from __future__ import absolute_import
  import warnings
  import inspect
  from functools import wraps
  from typing import Dict, Optional, Callable
  from sagemaker.session import Session, SessionSettings
  from sagemaker.local import LocalSession
  from sagemaker.workflow.pipeline_definition_config import PipelineDefinitionConfig
label_desc: Use image node_id 1 to create a new PipelineSession object from inherited base classes: Session with example: obj = PipelineSession(boto_session, sagemaker_client, default_bucket, settings, sagemaker_config, default_bucket_prefix)