Processor: Processor Class

ProcessorR Documentation

Processor Class

Description

Handles Amazon SageMaker Processing tasks.

Public fields

role

An AWS IAM role name or ARN

image_uri

The URI of the Docker image to use

instance_count

The number of instances to run

instance_type

The type of EC2 instance to use

entrypoint

The entrypoint for the processing job

volume_size_in_gb

Size in GB of the EBS volume

volume_kms_key

A KMS key for the processing

output_kms_key

The KMS key ID for processing job outputs

max_runtime_in_seconds

Timeout in seconds

base_job_name

Prefix for processing job name

sagemaker_session

Session object which manages interactions with Amazon SageMaker

env

Environment variables

tags

List of tags to be passed

network_config

A :class:'~sagemaker.network.NetworkConfig'

jobs

Jobs ran /running

latest_job

Previously ran jobs

.current_job_name

Current job

arguments

extra agruments

Methods

Public methods


Method new()

Initializes a “Processor“ instance. The “Processor“ handles Amazon SageMaker Processing tasks.

Usage
Processor$new(
  role,
  image_uri,
  instance_count,
  instance_type,
  entrypoint = NULL,
  volume_size_in_gb = 30,
  volume_kms_key = NULL,
  output_kms_key = NULL,
  max_runtime_in_seconds = NULL,
  base_job_name = NULL,
  sagemaker_session = NULL,
  env = NULL,
  tags = NULL,
  network_config = NULL
)
Arguments
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.

image_uri

(str): The URI of the Docker image to use for the processing jobs.

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'.

entrypoint

(list[str]): The entrypoint for the processing job (default: NULL). This is in the form of a list of strings that make a command.

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: NULL).

output_kms_key

(str): The KMS key ID for processing job outputs (default: NULL).

max_runtime_in_seconds

(int): Timeout in seconds (default: NULL). 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: NULL).

tags

(list[dict]): List of tags to be passed to the processing job (default: NULL). 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.


Method run()

Runs a processing job.

Usage
Processor$run(
  inputs = NULL,
  outputs = NULL,
  arguments = NULL,
  wait = TRUE,
  logs = TRUE,
  job_name = NULL,
  experiment_config = NULL
)
Arguments
inputs

(list[:class:'~sagemaker.processing.ProcessingInput']): Input files for the processing job. These must be provided as :class:'~sagemaker.processing.ProcessingInput' objects (default: NULL).

outputs

(list[:class:'~sagemaker.processing.ProcessingOutput']): Outputs for the processing job. These can be specified as either path strings or :class:'~sagemaker.processing.ProcessingOutput' objects (default: NULL).

arguments

(list[str]): A list of string arguments to be passed to a processing job (default: NULL).

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).

job_name

(str): Processing job name. If not specified, the processor generates a default job name, based on the base job name and current timestamp.

experiment_config

(dict[str, str]): Experiment management configuration. Dictionary contains three optional keys: 'ExperimentName', 'TrialName', and 'TrialComponentDisplayName'.


Method format()

format class

Usage
Processor$format()

Method clone()

The objects of this class are cloneable with this method.

Usage
Processor$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Other Processor: ProcessingInput, ProcessingJob, ProcessingOutput, ScriptProcessor


DyfanJones/sagemaker-r-common documentation built on June 14, 2022, 10:31 p.m.