Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . sagemaker ]

create-hyper-parameter-tuning-job

Description

Starts a hyperparameter tuning job.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  create-hyper-parameter-tuning-job
--hyper-parameter-tuning-job-name <value>
--hyper-parameter-tuning-job-config <value>
--training-job-definition <value>
[--tags <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--hyper-parameter-tuning-job-name (string)

The name of the tuning job. This name is the prefix for the names of all training jobs that this tuning job launches. The name must be unique within the same AWS account and AWS Region. Names are not case sensitive, and must be between 1-32 characters.

--hyper-parameter-tuning-job-config (structure)

The HyperParameterTuningJobConfig object that describes the tuning job, including the search strategy, metric used to evaluate training jobs, ranges of parameters to search, and resource limits for the tuning job.

JSON Syntax:

{
  "Strategy": "Bayesian",
  "HyperParameterTuningJobObjective": {
    "Type": "Maximize"|"Minimize",
    "MetricName": "string"
  },
  "ResourceLimits": {
    "MaxNumberOfTrainingJobs": integer,
    "MaxParallelTrainingJobs": integer
  },
  "ParameterRanges": {
    "IntegerParameterRanges": [
      {
        "Name": "string",
        "MinValue": "string",
        "MaxValue": "string"
      }
      ...
    ],
    "ContinuousParameterRanges": [
      {
        "Name": "string",
        "MinValue": "string",
        "MaxValue": "string"
      }
      ...
    ],
    "CategoricalParameterRanges": [
      {
        "Name": "string",
        "Values": ["string", ...]
      }
      ...
    ]
  }
}

--training-job-definition (structure)

The HyperParameterTrainingJobDefinition object that describes the training jobs that this tuning job launches, including static hyperparameters, input data configuration, output data configuration, resource configuration, and stopping condition.

JSON Syntax:

{
  "StaticHyperParameters": {"string": "string"
    ...},
  "AlgorithmSpecification": {
    "TrainingImage": "string",
    "TrainingInputMode": "Pipe"|"File",
    "MetricDefinitions": [
      {
        "Name": "string",
        "Regex": "string"
      }
      ...
    ]
  },
  "RoleArn": "string",
  "InputDataConfig": [
    {
      "ChannelName": "string",
      "DataSource": {
        "S3DataSource": {
          "S3DataType": "ManifestFile"|"S3Prefix",
          "S3Uri": "string",
          "S3DataDistributionType": "FullyReplicated"|"ShardedByS3Key"
        }
      },
      "ContentType": "string",
      "CompressionType": "None"|"Gzip",
      "RecordWrapperType": "None"|"RecordIO"
    }
    ...
  ],
  "VpcConfig": {
    "SecurityGroupIds": ["string", ...],
    "Subnets": ["string", ...]
  },
  "OutputDataConfig": {
    "KmsKeyId": "string",
    "S3OutputPath": "string"
  },
  "ResourceConfig": {
    "InstanceType": "ml.m4.xlarge"|"ml.m4.2xlarge"|"ml.m4.4xlarge"|"ml.m4.10xlarge"|"ml.m4.16xlarge"|"ml.m5.large"|"ml.m5.xlarge"|"ml.m5.2xlarge"|"ml.m5.4xlarge"|"ml.m5.12xlarge"|"ml.m5.24xlarge"|"ml.c4.xlarge"|"ml.c4.2xlarge"|"ml.c4.4xlarge"|"ml.c4.8xlarge"|"ml.p2.xlarge"|"ml.p2.8xlarge"|"ml.p2.16xlarge"|"ml.p3.2xlarge"|"ml.p3.8xlarge"|"ml.p3.16xlarge"|"ml.c5.xlarge"|"ml.c5.2xlarge"|"ml.c5.4xlarge"|"ml.c5.9xlarge"|"ml.c5.18xlarge",
    "InstanceCount": integer,
    "VolumeSizeInGB": integer,
    "VolumeKmsKeyId": "string"
  },
  "StoppingCondition": {
    "MaxRuntimeInSeconds": integer
  }
}

--tags (list)

An array of key-value pairs. You can use tags to categorize your AWS resources in different ways, for example, by purpose, owner, or environment. For more information, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide .

Shorthand Syntax:

Key=string,Value=string ...

JSON Syntax:

[
  {
    "Key": "string",
    "Value": "string"
  }
  ...
]

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Output

HyperParameterTuningJobArn -> (string)

The Amazon Resource Name (ARN) of the tuning job.