class_docstr: A class for handling creating and interacting with Amazon SageMaker transform jobs.
docstr: Initialize a ``Transformer``.
  
  Args:
      model_name (str or PipelineVariable): Name of the SageMaker model being
          used for the transform job.
      instance_count (int or PipelineVariable): Number of EC2 instances to use.
      instance_type (str or PipelineVariable): Type of EC2 instance to use, for example,
          'ml.c4.xlarge'.
      strategy (str or PipelineVariable): The strategy used to decide how to batch records
          in a single request (default: None). Valid values: 'MultiRecord'
          and 'SingleRecord'.
      assemble_with (str or PipelineVariable): How the output is assembled (default: None).
          Valid values: 'Line' or 'None'.
      output_path (str or PipelineVariable): S3 location for saving the transform result. If
          not specified, results are stored to a default bucket.
      output_kms_key (str or PipelineVariable): Optional. KMS key ID for encrypting the
          transform output (default: None).
      accept (str or PipelineVariable): The accept header passed by the client to
          the inference endpoint. If it is supported by the endpoint,
          it will be the format of the batch transform output.
      max_concurrent_transforms (int or PipelineVariable): The maximum number of HTTP requests
          to be made to each individual transform container at one time.
      max_payload (int or PipelineVariable): Maximum size of the payload in a single HTTP
          request to the container in MB.
      tags (Optional[Tags]): Tags for labeling a transform job (default: None).
          For more, see the SageMaker API documentation for
          `Tag <https://docs.aws.amazon.com/sagemaker/latest/dg/API_Tag.html>`_.
      env (dict[str, str] or dict[str, PipelineVariable]): Environment variables to be set
          for use during the transform job (default: None).
      base_transform_job_name (str): Prefix for the transform job when the
          :meth:`~sagemaker.transformer.Transformer.transform` method
          launches. If not specified, a default prefix will be generated
          based on the training image name that was used to train the
          model associated with the transform job.
      sagemaker_session (sagemaker.session.Session): Session object which
          manages interactions with Amazon SageMaker APIs and any other
          AWS services needed. If not specified, the estimator creates one
          using the default AWS configuration chain.
      volume_kms_key (str or PipelineVariable): Optional. KMS key ID for encrypting
          the volume attached to the ML compute instance (default: None).
docstr_tok: ["Initialize","a","``","Transformer","``",".","Args",":","model_name","(","str","or","PipelineVariable",")",":","Name","of","the","SageMaker","model","being","used","for","the","transform","job",".","instance_count","(","int","or","PipelineVariable",")",":","Number","of","EC2","instances","to","use",".","instance_type","(","str","or","PipelineVariable",")",":","Type","of","EC2","instance","to","use",",","for","example",",","'ml.c4.xlarge","'",".","strategy","(","str","or","PipelineVariable",")",":","The","strategy","used","to","decide","how","to","batch","records","in","a","single","request","(","default",":","None",")",".","Valid","values",":","'MultiRecord'","and","'SingleRecord","'",".","assemble_with","(","str","or","PipelineVariable",")",":","How","the","output","is","assembled","(","default",":","None",")",".","Valid","values",":","'Line","'","or","'None","'",".","output_path","(","str","or","PipelineVariable",")",":","S3","location","for","saving","the","transform","result",".","If","not","specified",",","results","are","stored","to","a","default","bucket",".","output_kms_key","(","str","or","PipelineVariable",")",":","Optional",".","KMS","key","ID","for","encrypting","the","transform","output","(","default",":","None",")",".","accept","(","str","or","PipelineVariable",")",":","The","accept","header","passed","by","the","client","to","the","inference","endpoint",".","If","it","is","supported","by","the","endpoint",",","it","will","be","the","format","of","the","batch","transform","output",".","max_concurrent_transforms","(","int","or","PipelineVariable",")",":","The","maximum","number","of","HTTP","requests","to","be","made","to","each","individual","transform","container","at","one","time",".","max_payload","(","int","or","PipelineVariable",")",":","Maximum","size","of","the","payload","in","a","single","HTTP","request","to","the","container","in","MB",".","tags","(","Optional","[","Tags","]",")",":","Tags","for","labeling","a","transform","job","(","default",":","None",")",".","For","more",",","see","the","SageMaker","API","documentation","for","`","Tag","<","https",":","\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/API_Tag.html",">","`","_",".","env","(","dict","[","str",",","str","]","or","dict","[","str",",","PipelineVariable","]",")",":","Environment","variables","to","be","set","for","use","during","the","transform","job","(","default",":","None",")",".","base_transform_job_name","(","str",")",":","Prefix","for","the","transform","job","when","the",":","meth",":","`","~sagemaker.transformer.Transformer.transform","`","method","launches",".","If","not","specified",",","a","default","prefix","will","be","generated","based","on","the","training","image","name","that","was","used","to","train","the","model","associated","with","the","transform","job",".","sagemaker_session","(","sagemaker.session.Session",")",":","Session","object","which","manages","interactions","with","Amazon","SageMaker","APIs","and","any","other","AWS","services","needed",".","If","not","specified",",","the","estimator","creates","one","using","the","default","AWS","configuration","chain",".","volume_kms_key","(","str","or","PipelineVariable",")",":","Optional",".","KMS","key","ID","for","encrypting","the","volume","attached","to","the","ML","compute","instance","(","default",":","None",")","."]
code: def __init__(
      self,
      model_name: Union[str, PipelineVariable],
      instance_count: Union[int, PipelineVariable],
      instance_type: Union[str, PipelineVariable],
      strategy: Optional[Union[str, PipelineVariable]] = None,
      assemble_with: Optional[Union[str, PipelineVariable]] = None,
      output_path: Optional[Union[str, PipelineVariable]] = None,
      output_kms_key: Optional[Union[str, PipelineVariable]] = None,
      accept: Optional[Union[str, PipelineVariable]] = None,
      max_concurrent_transforms: Optional[
          Union[int, PipelineVariable]
      ] = None,
      max_payload: Optional[Union[int, PipelineVariable]] = None,
      tags: Optional[Tags] = None,
      env: Optional[Dict[str, Union[str, PipelineVariable]]] = None,
      base_transform_job_name: Optional[str] = None,
      sagemaker_session: Optional[Session] = None,
      volume_kms_key: Optional[Union[str, PipelineVariable]] = None,
  ):
      """Initialize a ``Transformer``.
  
      Args:
          model_name (str or PipelineVariable): Name of the SageMaker model being
              used for the transform job.
          instance_count (int or PipelineVariable): Number of EC2 instances to use.
          instance_type (str or PipelineVariable): Type of EC2 instance to use, for example,
              'ml.c4.xlarge'.
          strategy (str or PipelineVariable): The strategy used to decide how to batch records
              in a single request (default: None). Valid values: 'MultiRecord'
              and 'SingleRecord'.
          assemble_with (str or PipelineVariable): How the output is assembled (default: None).
              Valid values: 'Line' or 'None'.
          output_path (str or PipelineVariable): S3 location for saving the transform result. If
              not specified, results are stored to a default bucket.
          output_kms_key (str or PipelineVariable): Optional. KMS key ID for encrypting the
              transform output (default: None).
          accept (str or PipelineVariable): The accept header passed by the client to
              the inference endpoint. If it is supported by the endpoint,
              it will be the format of the batch transform output.
          max_concurrent_transforms (int or PipelineVariable): The maximum number of HTTP requests
              to be made to each individual transform container at one time.
          max_payload (int or PipelineVariable): Maximum size of the payload in a single HTTP
              request to the container in MB.
          tags (Optional[Tags]): Tags for labeling a transform job (default: None).
              For more, see the SageMaker API documentation for
              `Tag <https://docs.aws.amazon.com/sagemaker/latest/dg/API_Tag.html>`_.
          env (dict[str, str] or dict[str, PipelineVariable]): Environment variables to be set
              for use during the transform job (default: None).
          base_transform_job_name (str): Prefix for the transform job when the
              :meth:`~sagemaker.transformer.Transformer.transform` method
              launches. If not specified, a default prefix will be generated
              based on the training image name that was used to train the
              model associated with the transform job.
          sagemaker_session (sagemaker.session.Session): Session object which
              manages interactions with Amazon SageMaker APIs and any other
              AWS services needed. If not specified, the estimator creates one
              using the default AWS configuration chain.
          volume_kms_key (str or PipelineVariable): Optional. KMS key ID for encrypting
              the volume attached to the ML compute instance (default: None).
      """
      self.model_name = model_name
      self.strategy = strategy
  
      self.output_path = output_path
      self.accept = accept
      self.assemble_with = assemble_with
  
      self.instance_count = instance_count
      self.instance_type = instance_type
  
      self.max_concurrent_transforms = max_concurrent_transforms
      self.max_payload = max_payload
      self.tags = format_tags(tags)
  
      self.base_transform_job_name = base_transform_job_name
      self._current_job_name = None
      self.latest_transform_job = None
      self._reset_output_path = False
  
      self.sagemaker_session = sagemaker_session or Session()
      self.volume_kms_key = resolve_value_from_config(
          volume_kms_key,
          TRANSFORM_RESOURCES_VOLUME_KMS_KEY_ID_PATH,
          sagemaker_session=self.sagemaker_session,
      )
      self.output_kms_key = resolve_value_from_config(
          output_kms_key,
          TRANSFORM_OUTPUT_KMS_KEY_ID_PATH,
          sagemaker_session=self.sagemaker_session,
      )
      self.env = resolve_value_from_config(
          env,
          TRANSFORM_JOB_ENVIRONMENT_PATH,
          sagemaker_session=self.sagemaker_session,
      )
  
imports: from __future__ import absolute_import
  from typing import Union, Optional, Dict
  import logging
  import copy
  import time
  from botocore import exceptions
  from sagemaker import s3
  from sagemaker.config import TRANSFORM_JOB_ENVIRONMENT_PATH, TRANSFORM_OUTPUT_KMS_KEY_ID_PATH, TRANSFORM_JOB_KMS_KEY_ID_PATH, TRANSFORM_RESOURCES_VOLUME_KMS_KEY_ID_PATH, PIPELINE_ROLE_ARN_PATH
  from sagemaker.job import _Job
  from sagemaker.session import Session, get_execution_role
  from sagemaker.inputs import BatchDataCaptureConfig
  from sagemaker.workflow.entities import PipelineVariable
  from sagemaker.workflow.functions import Join
  from sagemaker.workflow.pipeline_context import runnable_by_pipeline, PipelineSession
  from sagemaker.workflow import is_pipeline_variable
  from sagemaker.workflow.execution_variables import ExecutionVariables
  from sagemaker.utils import base_name_from_image, name_from_base, check_and_get_run_experiment_config, resolve_value_from_config, resolve_class_attribute_from_config, format_tags, Tags
label_desc: Use image node_id 1 to create a new Transformer object from inherited base classes: object with example: obj = Transformer(model_name, instance_count, instance_type, strategy, assemble_with, output_path, output_kms_key, accept, max_concurrent_transforms, max_payload, tags, env, base_transform_job_name, sagemaker_session, volume_kms_key)