class_docstr: A class for handling creating and interacting with Amazon SageMaker transform jobs.
docstr: Start a new transform job.
  
  Args:
      data (str or PipelineVariable): Input data location in S3.
      data_type (str or PipelineVariable): What the S3 location defines (default: 'S3Prefix').
          Valid values:
  
          * 'S3Prefix' - the S3 URI defines a key name prefix. All objects with this prefix
              will be used as inputs for the transform job.
  
          * 'ManifestFile' - the S3 URI points to a single manifest file listing each S3
              object to use as an input for the transform job.
  
      content_type (str or PipelineVariable): MIME type of the input data (default: None).
      compression_type (str or PipelineVariable): Compression type of the input data, if
          compressed (default: None). Valid values: 'Gzip', None.
      split_type (str or PipelineVariable): The record delimiter for the input object
          (default: 'None'). Valid values: 'None', 'Line', 'RecordIO', and
          'TFRecord'.
      job_name (str): job name (default: None). If not specified, one will
          be generated.
      input_filter (str or PipelineVariable): A JSONPath to select a portion of the input to
          pass to the algorithm container for inference. If you omit the
          field, it gets the value '$', representing the entire input.
          For CSV data, each row is taken as a JSON array,
          so only index-based JSONPaths can be applied, e.g. $[0], $[1:].
          CSV data should follow the `RFC format <https://tools.ietf.org/html/rfc4180>`_.
          See `Supported JSONPath Operators
          <https://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform-data-processing.html#data-processing-operators>`_
          for a table of supported JSONPath operators.
          For more information, see the SageMaker API documentation for
          `CreateTransformJob
          <https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateTransformJob.html>`_.
          Some examples: "$[1:]", "$.features" (default: None).
      output_filter (str or PipelineVariable): A JSONPath to select a portion of the
          joined/original output to return as the output.
          For more information, see the SageMaker API documentation for
          `CreateTransformJob
          <https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateTransformJob.html>`_.
          Some examples: "$[1:]", "$.prediction" (default: None).
      join_source (str or PipelineVariable): The source of data to be joined to the transform
          output. It can be set to 'Input' meaning the entire input record
          will be joined to the inference result. You can use OutputFilter
          to select the useful portion before uploading to S3. (default:
          None). Valid values: Input, None.
      experiment_config (dict[str, str]): Experiment management configuration.
          Optionally, the dict can contain three keys:
          'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.
          The behavior of setting these keys is as follows:
          * If `ExperimentName` is supplied but `TrialName` is not a Trial will be
          automatically created and the job's Trial Component associated with the Trial.
          * If `TrialName` is supplied and the Trial already exists the job's Trial Component
          will be associated with the Trial.
          * If both `ExperimentName` and `TrialName` are not supplied the trial component
          will be unassociated.
          * `TrialComponentDisplayName` is used for display in Studio.
          * Both `ExperimentName` and `TrialName` will be ignored if the Transformer instance
          is built with :class:`~sagemaker.workflow.pipeline_context.PipelineSession`.
          However, the value of `TrialComponentDisplayName` is honored for display in Studio.
      model_client_config (dict[str, str] or dict[str, PipelineVariable]): Model
          configuration. Dictionary contains two optional keys,
          'InvocationsTimeoutInSeconds', and 'InvocationsMaxRetries'.
          (default: ``None``).
      batch_data_capture_config (BatchDataCaptureConfig): Configuration object which
          specifies the configurations related to the batch data capture for the transform job
          (default: ``None``).
      batch_data_capture_config (BatchDataCaptureConfig): Configuration object which
          specifies the configurations related to the batch data capture for the transform job
          (default: ``None``).
      wait (bool): Whether the call should wait until the job completes
          (default: ``True``).
      logs (bool): Whether to show the logs produced by the job.
          Only meaningful when wait is ``True`` (default: ``True``).
  Returns:
      None or pipeline step arguments in case the Transformer instance is built with
      :class:`~sagemaker.workflow.pipeline_context.PipelineSession`
docstr_tok: ["Start","a","new","transform","job",".","Args",":","data","(","str","or","PipelineVariable",")",":","Input","data","location","in","S3",".","data_type","(","str","or","PipelineVariable",")",":","What","the","S3","location","defines","(","default",":","'S3Prefix","'",")",".","Valid","values",":","*","'S3Prefix","'","-","the","S3","URI","defines","a","key","name","prefix",".","All","objects","with","this","prefix","will","be","used","as","inputs","for","the","transform","job",".","*","'ManifestFile","'","-","the","S3","URI","points","to","a","single","manifest","file","listing","each","S3","object","to","use","as","an","input","for","the","transform","job",".","content_type","(","str","or","PipelineVariable",")",":","MIME","type","of","the","input","data","(","default",":","None",")",".","compression_type","(","str","or","PipelineVariable",")",":","Compression","type","of","the","input","data",",","if","compressed","(","default",":","None",")",".","Valid","values",":","'Gzip","'",",","None",".","split_type","(","str","or","PipelineVariable",")",":","The","record","delimiter","for","the","input","object","(","default",":","'None","'",")",".","Valid","values",":","'None","'",",","'Line","'",",","'RecordIO","'",",","and","'TFRecord","'",".","job_name","(","str",")",":","job","name","(","default",":","None",")",".","If","not","specified",",","one","will","be","generated",".","input_filter","(","str","or","PipelineVariable",")",":","A","JSONPath","to","select","a","portion","of","the","input","to","pass","to","the","algorithm","container","for","inference",".","If","you","omit","the","field",",","it","gets","the","value","'","$","'",",","representing","the","entire","input",".","For","CSV","data",",","each","row","is","taken","as","a","JSON","array",",","so","only","index-based","JSONPaths","can","be","applied",",","e.g",".","$","[","0","]",",","$","[","1",":","]",".","CSV","data","should","follow","the","`","RFC","format","<","https",":","\/\/tools.ietf.org\/html\/rfc4180",">","`","_",".","See","`","Supported","JSONPath","Operators","<","https",":","\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/batch-transform-data-processing.html","#","data-processing-operators",">","`","_","for","a","table","of","supported","JSONPath","operators",".","For","more","information",",","see","the","SageMaker","API","documentation","for","`","CreateTransformJob","<","https",":","\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/API_CreateTransformJob.html",">","`","_",".","Some","examples",":","``","$","[","1",":","]","''",",","``","$",".features","''","(","default",":","None",")",".","output_filter","(","str","or","PipelineVariable",")",":","A","JSONPath","to","select","a","portion","of","the","joined\/original","output","to","return","as","the","output",".","For","more","information",",","see","the","SageMaker","API","documentation","for","`","CreateTransformJob","<","https",":","\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/API_CreateTransformJob.html",">","`","_",".","Some","examples",":","``","$","[","1",":","]","''",",","``","$",".prediction","''","(","default",":","None",")",".","join_source","(","str","or","PipelineVariable",")",":","The","source","of","data","to","be","joined","to","the","transform","output",".","It","can","be","set","to","'Input","'","meaning","the","entire","input","record","will","be","joined","to","the","inference","result",".","You","can","use","OutputFilter","to","select","the","useful","portion","before","uploading","to","S3",".","(","default",":","None",")",".","Valid","values",":","Input",",","None",".","experiment_config","(","dict","[","str",",","str","]",")",":","Experiment","management","configuration",".","Optionally",",","the","dict","can","contain","three","keys",":","'ExperimentName","'",",","'TrialName","'",",","and","'TrialComponentDisplayName","'",".","The","behavior","of","setting","these","keys","is","as","follows",":","*","If","`","ExperimentName","`","is","supplied","but","`","TrialName","`","is","not","a","Trial","will","be","automatically","created","and","the","job","'s","Trial","Component","associated","with","the","Trial",".","*","If","`","TrialName","`","is","supplied","and","the","Trial","already","exists","the","job","'s","Trial","Component","will","be","associated","with","the","Trial",".","*","If","both","`","ExperimentName","`","and","`","TrialName","`","are","not","supplied","the","trial","component","will","be","unassociated",".","*","`","TrialComponentDisplayName","`","is","used","for","display","in","Studio",".","*","Both","`","ExperimentName","`","and","`","TrialName","`","will","be","ignored","if","the","Transformer","instance","is","built","with",":","class",":","`","~sagemaker.workflow.pipeline_context.PipelineSession","`",".","However",",","the","value","of","`","TrialComponentDisplayName","`","is","honored","for","display","in","Studio",".","model_client_config","(","dict","[","str",",","str","]","or","dict","[","str",",","PipelineVariable","]",")",":","Model","configuration",".","Dictionary","contains","two","optional","keys",",","'InvocationsTimeoutInSeconds","'",",","and","'InvocationsMaxRetries","'",".","(","default",":","``","None","``",")",".","batch_data_capture_config","(","BatchDataCaptureConfig",")",":","Configuration","object","which","specifies","the","configurations","related","to","the","batch","data","capture","for","the","transform","job","(","default",":","``","None","``",")",".","batch_data_capture_config","(","BatchDataCaptureConfig",")",":","Configuration","object","which","specifies","the","configurations","related","to","the","batch","data","capture","for","the","transform","job","(","default",":","``","None","``",")",".","wait","(","bool",")",":","Whether","the","call","should","wait","until","the","job","completes","(","default",":","``","True","``",")",".","logs","(","bool",")",":","Whether","to","show","the","logs","produced","by","the","job",".","Only","meaningful","when","wait","is","``","True","``","(","default",":","``","True","``",")",".","Returns",":","None","or","pipeline","step","arguments","in","case","the","Transformer","instance","is","built","with",":","class",":","`","~sagemaker.workflow.pipeline_context.PipelineSession","`"]
code: def transform(
      self,
      data: Union[str, PipelineVariable],
      data_type: Union[str, PipelineVariable] = "S3Prefix",
      content_type: Optional[Union[str, PipelineVariable]] = None,
      compression_type: Optional[Union[str, PipelineVariable]] = None,
      split_type: Optional[Union[str, PipelineVariable]] = None,
      job_name: Optional[str] = None,
      input_filter: Optional[Union[str, PipelineVariable]] = None,
      output_filter: Optional[Union[str, PipelineVariable]] = None,
      join_source: Optional[Union[str, PipelineVariable]] = None,
      experiment_config: Optional[Dict[str, str]] = None,
      model_client_config: Optional[
          Dict[str, Union[str, PipelineVariable]]
      ] = None,
      batch_data_capture_config: BatchDataCaptureConfig = None,
      wait: bool = True,
      logs: bool = True,
  ):
      """Start a new transform job.
  
      Args:
          data (str or PipelineVariable): Input data location in S3.
          data_type (str or PipelineVariable): What the S3 location defines (default: 'S3Prefix').
              Valid values:
  
              * 'S3Prefix' - the S3 URI defines a key name prefix. All objects with this prefix
                  will be used as inputs for the transform job.
  
              * 'ManifestFile' - the S3 URI points to a single manifest file listing each S3
                  object to use as an input for the transform job.
  
          content_type (str or PipelineVariable): MIME type of the input data (default: None).
          compression_type (str or PipelineVariable): Compression type of the input data, if
              compressed (default: None). Valid values: 'Gzip', None.
          split_type (str or PipelineVariable): The record delimiter for the input object
              (default: 'None'). Valid values: 'None', 'Line', 'RecordIO', and
              'TFRecord'.
          job_name (str): job name (default: None). If not specified, one will
              be generated.
          input_filter (str or PipelineVariable): A JSONPath to select a portion of the input to
              pass to the algorithm container for inference. If you omit the
              field, it gets the value '$', representing the entire input.
              For CSV data, each row is taken as a JSON array,
              so only index-based JSONPaths can be applied, e.g. $[0], $[1:].
              CSV data should follow the `RFC format <https://tools.ietf.org/html/rfc4180>`_.
              See `Supported JSONPath Operators
              <https://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform-data-processing.html#data-processing-operators>`_
              for a table of supported JSONPath operators.
              For more information, see the SageMaker API documentation for
              `CreateTransformJob
              <https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateTransformJob.html>`_.
              Some examples: "$[1:]", "$.features" (default: None).
          output_filter (str or PipelineVariable): A JSONPath to select a portion of the
              joined/original output to return as the output.
              For more information, see the SageMaker API documentation for
              `CreateTransformJob
              <https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateTransformJob.html>`_.
              Some examples: "$[1:]", "$.prediction" (default: None).
          join_source (str or PipelineVariable): The source of data to be joined to the transform
              output. It can be set to 'Input' meaning the entire input record
              will be joined to the inference result. You can use OutputFilter
              to select the useful portion before uploading to S3. (default:
              None). Valid values: Input, None.
          experiment_config (dict[str, str]): Experiment management configuration.
              Optionally, the dict can contain three keys:
              'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.
              The behavior of setting these keys is as follows:
              * If `ExperimentName` is supplied but `TrialName` is not a Trial will be
              automatically created and the job's Trial Component associated with the Trial.
              * If `TrialName` is supplied and the Trial already exists the job's Trial Component
              will be associated with the Trial.
              * If both `ExperimentName` and `TrialName` are not supplied the trial component
              will be unassociated.
              * `TrialComponentDisplayName` is used for display in Studio.
              * Both `ExperimentName` and `TrialName` will be ignored if the Transformer instance
              is built with :class:`~sagemaker.workflow.pipeline_context.PipelineSession`.
              However, the value of `TrialComponentDisplayName` is honored for display in Studio.
          model_client_config (dict[str, str] or dict[str, PipelineVariable]): Model
              configuration. Dictionary contains two optional keys,
              'InvocationsTimeoutInSeconds', and 'InvocationsMaxRetries'.
              (default: ``None``).
          batch_data_capture_config (BatchDataCaptureConfig): Configuration object which
              specifies the configurations related to the batch data capture for the transform job
              (default: ``None``).
          batch_data_capture_config (BatchDataCaptureConfig): Configuration object which
              specifies the configurations related to the batch data capture for the transform job
              (default: ``None``).
          wait (bool): Whether the call should wait until the job completes
              (default: ``True``).
          logs (bool): Whether to show the logs produced by the job.
              Only meaningful when wait is ``True`` (default: ``True``).
      Returns:
          None or pipeline step arguments in case the Transformer instance is built with
          :class:`~sagemaker.workflow.pipeline_context.PipelineSession`
      """
      from sagemaker.workflow.utilities import _pipeline_config
  
      local_mode = self.sagemaker_session.local_mode
      if (
          not local_mode
          and not is_pipeline_variable(data)
          and not data.startswith("s3://")
      ):
          raise ValueError("Invalid S3 URI: {}".format(data))
  
      if job_name is not None:
          self._current_job_name = job_name
      else:
          base_name = self.base_transform_job_name
  
          if base_name is None:
              base_name = (
                  "transform-job"
                  if is_pipeline_variable(self.model_name)
                  else self._retrieve_base_name()
              )
  
          self._current_job_name = name_from_base(base_name)
  
      if self.output_path is None or self._reset_output_path is True:
          if _pipeline_config:
              self.output_path = Join(
                  on="/",
                  values=[
                      "s3:/",
                      self.sagemaker_session.default_bucket(),
                      *(
                          # don't include default_bucket_prefix if it is None or ""
                          [self.sagemaker_session.default_bucket_prefix]
                          if self.sagemaker_session.default_bucket_prefix
                          else []
                      ),
                      _pipeline_config.pipeline_name,
                      ExecutionVariables.PIPELINE_EXECUTION_ID,
                      _pipeline_config.step_name,
                  ],
              )
          else:
              self.output_path = s3.s3_path_join(
                  "s3://",
                  self.sagemaker_session.default_bucket(),
                  self.sagemaker_session.default_bucket_prefix,
                  self._current_job_name,
              )
          self._reset_output_path = True
  
      experiment_config = check_and_get_run_experiment_config(
          experiment_config
      )
  
      batch_data_capture_config = resolve_class_attribute_from_config(
          None,
          batch_data_capture_config,
          "kms_key_id",
          TRANSFORM_JOB_KMS_KEY_ID_PATH,
          sagemaker_session=self.sagemaker_session,
      )
  
      self.latest_transform_job = _TransformJob.start_new(
          self,
          data,
          data_type,
          content_type,
          compression_type,
          split_type,
          input_filter,
          output_filter,
          join_source,
          experiment_config,
          model_client_config,
          batch_data_capture_config,
      )
  
      if wait:
          self.latest_transform_job.wait(logs=logs)
  
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 2 for calling the Transformer obj's underlying member method code with example usage: obj.transform(data, data_type, content_type, compression_type, split_type, job_name, input_filter, output_filter, join_source, experiment_config, model_client_config, batch_data_capture_config, wait, logs) without return types