TuningStep: Workflow TuningStep class

TuningStepR Documentation

Workflow TuningStep class

Description

Tuning step for workflow.

Super classes

sagemaker.workflow::Entity -> sagemaker.workflow::Step -> sagemaker.workflow::ConfigurableRetryStep -> TuningStep

Active bindings

arguments

The arguments dict that is used to call 'create_hyper_parameter_tuning_job'. NOTE: The CreateHyperParameterTuningJob request is not quite the args list that workflow needs. The HyperParameterTuningJobName attribute cannot be included.

properties

A Properties object representing 'DescribeHyperParameterTuningJobResponse' and 'ListTrainingJobsForHyperParameterTuningJobResponse' data model.

Methods

Public methods

Inherited methods

Method new()

Construct a TuningStep, given a 'HyperparameterTuner' instance. In addition to the tuner instance, the other arguments are those that are supplied to the 'fit' method of the 'sagemaker.tuner.HyperparameterTuner'.

Usage
TuningStep$new(
  name,
  tuner,
  display_name = NULL,
  description = NULL,
  inputs = NULL,
  job_arguments = NULL,
  cache_config = NULL,
  depends_on = NULL,
  retry_policies = NULL
)
Arguments
name

(str): The name of the tuning step.

tuner

(HyperparameterTuner): A 'sagemaker.tuner.HyperparameterTuner' instance.

display_name

(str): The display name of the tuning step.

description

(str): The description of the tuning step.

inputs

: Information about the training data. Please refer to the “fit()“ method of the associated estimator, as this can take any of the following forms:

  • (str) - The S3 location where training data is saved.

  • (dict[str, str] or dict[str, sagemaker.inputs.TrainingInput]) - If using multiple channels for training data, you can specify a dict mapping channel names to strings or :func:'~sagemaker.inputs.TrainingInput' objects.

  • (sagemaker.inputs.TrainingInput) - Channel configuration for S3 data sources that can provide additional information about the training dataset. See :func:'sagemaker.inputs.TrainingInput' for full details.

  • (sagemaker.session.FileSystemInput) - channel configuration for a file system data source that can provide additional information as well as the path to the training dataset.

  • (sagemaker.amazon.amazon_estimator.RecordSet) - A collection of Amazon :class:~'Record' objects serialized and stored in S3. For use with an estimator for an Amazon algorithm.

  • (sagemaker.amazon.amazon_estimator.FileSystemRecordSet) - Amazon SageMaker channel configuration for a file system data source for Amazon algorithms.

  • (list[sagemaker.amazon.amazon_estimator.RecordSet]) - A list of :class:~'sagemaker.amazon.amazon_estimator.RecordSet' objects, where each instance is a different channel of training data.

  • (list[sagemaker.amazon.amazon_estimator.FileSystemRecordSet]) - A list of :class:~'sagemaker.amazon.amazon_estimator.FileSystemRecordSet' objects, where each instance is a different channel of training data.

job_arguments

(List[str]): A list of strings to be passed into the processing job. Defaults to 'None'.

cache_config

(CacheConfig): A 'sagemaker.workflow.steps.CacheConfig' instance.

depends_on

(List[str] or List[Step]): A list of step names or step instance this 'sagemaker.workflow.steps.ProcessingStep' depends on

retry_policies

(List[RetryPolicy]): A list of retry policy


Method to_request()

Updates the dictionary with cache configuration.

Usage
TuningStep$to_request()

Method get_top_model_s3_uri()

Get the model artifact s3 uri from the top performing training jobs.

Usage
TuningStep$get_top_model_s3_uri(top_k, s3_bucket, prefix = "")
Arguments
top_k

(int): the index of the top performing training job tuning step stores up to 50 top performing training jobs, hence a valid top_k value is from 0 to 49. The best training job model is at index 0

s3_bucket

(str): the s3 bucket to store the training job output artifact

prefix

(str): the s3 key prefix to store the training job output artifact


Method clone()

The objects of this class are cloneable with this method.

Usage
TuningStep$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


DyfanJones/sagemaker-r-workflow documentation built on April 3, 2022, 11:28 p.m.