class_docstr: Handles Amazon SageMaker DataWrangler tasks
class_docstr_tok: ["Handles","Amazon","SageMaker","DataWrangler","tasks"]
docstr: Initializes a ``Processor`` instance.
  
  The ``Processor`` handles Amazon SageMaker Processing tasks.
  
  Args:
      role (str): An AWS IAM role name or ARN. Amazon SageMaker Processing
          uses this role to access AWS resources, such as
          data stored in Amazon S3.
      data_wrangler_flow_source (str): The source of the DaraWrangler flow which will be
          used for the DataWrangler job. If a local path is provided, it will automatically
          be uploaded to S3 under:
          "s3://<default-bucket-name>/<job-name>/input/<input-name>".
      instance_count (int): The number of instances to run
          a processing job with.
      instance_type (str): The type of EC2 instance to use for
          processing, for example, 'ml.c4.xlarge'.
      volume_size_in_gb (int): Size in GB of the EBS volume
          to use for storing data during processing (default: 30).
      volume_kms_key (str): A KMS key for the processing
          volume (default: None).
      output_kms_key (str): The KMS key ID for processing job outputs (default: None).
      max_runtime_in_seconds (int): Timeout in seconds (default: None).
          After this amount of time, Amazon SageMaker terminates the job,
          regardless of its current status. If `max_runtime_in_seconds` is not
          specified, the default value is 24 hours.
      base_job_name (str): Prefix for processing job name. If not specified,
          the processor generates a default job name, based on the
          processing image name and current timestamp.
      sagemaker_session (:class:`~sagemaker.session.Session`):
          Session object which manages interactions with Amazon SageMaker and
          any other AWS services needed. If not specified, the processor creates
          one using the default AWS configuration chain.
      env (dict[str, str]): Environment variables to be passed to
          the processing jobs (default: None).
      tags (Optional[Tags]): Tags to be passed to the processing job
          (default: None). For more, see
          https://docs.aws.amazon.com/sagemaker/latest/dg/API_Tag.html.
      network_config (:class:`~sagemaker.network.NetworkConfig`):
          A :class:`~sagemaker.network.NetworkConfig`
          object that configures network isolation, encryption of
          inter-container traffic, security group IDs, and subnets.
docstr_tok: ["Initializes","a","``","Processor","``","instance",".","The","``","Processor","``","handles","Amazon","SageMaker","Processing","tasks",".","Args",":","role","(","str",")",":","An","AWS","IAM","role","name","or","ARN",".","Amazon","SageMaker","Processing","uses","this","role","to","access","AWS","resources",",","such","as","data","stored","in","Amazon","S3",".","data_wrangler_flow_source","(","str",")",":","The","source","of","the","DaraWrangler","flow","which","will","be","used","for","the","DataWrangler","job",".","If","a","local","path","is","provided",",","it","will","automatically","be","uploaded","to","S3","under",":","``","s3",":","\/\/","<","default-bucket-name",">","\/","<","job-name",">","\/input\/","<","input-name",">","''",".","instance_count","(","int",")",":","The","number","of","instances","to","run","a","processing","job","with",".","instance_type","(","str",")",":","The","type","of","EC2","instance","to","use","for","processing",",","for","example",",","'ml.c4.xlarge","'",".","volume_size_in_gb","(","int",")",":","Size","in","GB","of","the","EBS","volume","to","use","for","storing","data","during","processing","(","default",":","30",")",".","volume_kms_key","(","str",")",":","A","KMS","key","for","the","processing","volume","(","default",":","None",")",".","output_kms_key","(","str",")",":","The","KMS","key","ID","for","processing","job","outputs","(","default",":","None",")",".","max_runtime_in_seconds","(","int",")",":","Timeout","in","seconds","(","default",":","None",")",".","After","this","amount","of","time",",","Amazon","SageMaker","terminates","the","job",",","regardless","of","its","current","status",".","If","`","max_runtime_in_seconds","`","is","not","specified",",","the","default","value","is","24","hours",".","base_job_name","(","str",")",":","Prefix","for","processing","job","name",".","If","not","specified",",","the","processor","generates","a","default","job","name",",","based","on","the","processing","image","name","and","current","timestamp",".","sagemaker_session","(",":","class",":","`","~sagemaker.session.Session","`",")",":","Session","object","which","manages","interactions","with","Amazon","SageMaker","and","any","other","AWS","services","needed",".","If","not","specified",",","the","processor","creates","one","using","the","default","AWS","configuration","chain",".","env","(","dict","[","str",",","str","]",")",":","Environment","variables","to","be","passed","to","the","processing","jobs","(","default",":","None",")",".","tags","(","Optional","[","Tags","]",")",":","Tags","to","be","passed","to","the","processing","job","(","default",":","None",")",".","For","more",",","see","https",":","\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/API_Tag.html",".","network_config","(",":","class",":","`","~sagemaker.network.NetworkConfig","`",")",":","A",":","class",":","`","~sagemaker.network.NetworkConfig","`","object","that","configures","network","isolation",",","encryption","of","inter-container","traffic",",","security","group","IDs",",","and","subnets","."]
code: def __init__(
      self,
      role: str = None,
      data_wrangler_flow_source: str = None,
      instance_count: int = None,
      instance_type: str = None,
      volume_size_in_gb: int = 30,
      volume_kms_key: str = None,
      output_kms_key: str = None,
      max_runtime_in_seconds: int = None,
      base_job_name: str = None,
      sagemaker_session: Session = None,
      env: Dict[str, str] = None,
      tags: Optional[Tags] = None,
      network_config: NetworkConfig = None,
  ):
      """Initializes a ``Processor`` instance.
  
      The ``Processor`` handles Amazon SageMaker Processing tasks.
  
      Args:
          role (str): An AWS IAM role name or ARN. Amazon SageMaker Processing
              uses this role to access AWS resources, such as
              data stored in Amazon S3.
          data_wrangler_flow_source (str): The source of the DaraWrangler flow which will be
              used for the DataWrangler job. If a local path is provided, it will automatically
              be uploaded to S3 under:
              "s3://<default-bucket-name>/<job-name>/input/<input-name>".
          instance_count (int): The number of instances to run
              a processing job with.
          instance_type (str): The type of EC2 instance to use for
              processing, for example, 'ml.c4.xlarge'.
          volume_size_in_gb (int): Size in GB of the EBS volume
              to use for storing data during processing (default: 30).
          volume_kms_key (str): A KMS key for the processing
              volume (default: None).
          output_kms_key (str): The KMS key ID for processing job outputs (default: None).
          max_runtime_in_seconds (int): Timeout in seconds (default: None).
              After this amount of time, Amazon SageMaker terminates the job,
              regardless of its current status. If `max_runtime_in_seconds` is not
              specified, the default value is 24 hours.
          base_job_name (str): Prefix for processing job name. If not specified,
              the processor generates a default job name, based on the
              processing image name and current timestamp.
          sagemaker_session (:class:`~sagemaker.session.Session`):
              Session object which manages interactions with Amazon SageMaker and
              any other AWS services needed. If not specified, the processor creates
              one using the default AWS configuration chain.
          env (dict[str, str]): Environment variables to be passed to
              the processing jobs (default: None).
          tags (Optional[Tags]): Tags to be passed to the processing job
              (default: None). For more, see
              https://docs.aws.amazon.com/sagemaker/latest/dg/API_Tag.html.
          network_config (:class:`~sagemaker.network.NetworkConfig`):
              A :class:`~sagemaker.network.NetworkConfig`
              object that configures network isolation, encryption of
              inter-container traffic, security group IDs, and subnets.
      """
      self.data_wrangler_flow_source = data_wrangler_flow_source
      self.sagemaker_session = sagemaker_session or Session()
      image_uri = image_uris.retrieve(
          "data-wrangler",
          region=self.sagemaker_session.boto_region_name,
      )
      super().__init__(
          role,
          image_uri,
          instance_count,
          instance_type,
          volume_size_in_gb=volume_size_in_gb,
          volume_kms_key=volume_kms_key,
          output_kms_key=output_kms_key,
          max_runtime_in_seconds=max_runtime_in_seconds,
          base_job_name=base_job_name,
          sagemaker_session=sagemaker_session,
          env=env,
          tags=format_tags(tags),
          network_config=network_config,
      )
  
file_path: sagemaker-python-sdk/src/sagemaker/wrangler/processing.py
imports: from __future__ import absolute_import
  from typing import Dict, Optional
  from sagemaker.network import NetworkConfig
  from sagemaker.processing import ProcessingInput, Processor
  from sagemaker import image_uris
  from sagemaker.session import Session
  from sagemaker.utils import format_tags, Tags
label_desc: Use image node_id 1 to create a new DataWranglerProcessor object from inherited base classes: Processor with example: obj = DataWranglerProcessor(role, data_wrangler_flow_source, instance_count, instance_type, volume_size_in_gb, volume_kms_key, output_kms_key, max_runtime_in_seconds, base_job_name, sagemaker_session, env, tags, network_config)