AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the Amazon SageMaker Service CreateHyperParameterTuningJob API operation.

Syntax

New-SMHyperParameterTuningJob
-HyperParameterTuningJobName <String>
-AlgorithmSpecification_AlgorithmName <String>
-ParameterRanges_CategoricalParameterRange <CategoricalParameterRange[]>
-ParameterRanges_ContinuousParameterRange <ContinuousParameterRange[]>
-TrainingJobDefinition_EnableInterContainerTrafficEncryption <Boolean>
-TrainingJobDefinition_EnableManagedSpotTraining <Boolean>
-TrainingJobDefinition_EnableNetworkIsolation <Boolean>
-TrainingJobDefinition_InputDataConfig <Channel[]>
-ParameterRanges_IntegerParameterRange <IntegerParameterRange[]>
-CheckpointConfig_LocalPath <String>
-ResourceLimits_MaxNumberOfTrainingJob <Int32>
-ResourceLimits_MaxParallelTrainingJob <Int32>
-StoppingCondition_MaxRuntimeInSecond <Int32>
-StoppingCondition_MaxWaitTimeInSecond <Int32>
-AlgorithmSpecification_MetricDefinition <MetricDefinition[]>
-HyperParameterTuningJobObjective_MetricName <String>
-TrainingJobDefinition_OutputDataConfig <OutputDataConfig>
-WarmStartConfig_ParentHyperParameterTuningJob <ParentHyperParameterTuningJob[]>
-TrainingJobDefinition_ResourceConfig <ResourceConfig>
-TrainingJobDefinition_RoleArn <String>
-CheckpointConfig_S3Uri <String>
-VpcConfig_SecurityGroupId <String[]>
-TrainingJobDefinition_StaticHyperParameter <Hashtable>
-HyperParameterTuningJobConfig_Strategy <HyperParameterTuningJobStrategyType>
-VpcConfig_Subnet <String[]>
-Tag <Tag[]>
-AlgorithmSpecification_TrainingImage <String>
-AlgorithmSpecification_TrainingInputMode <TrainingInputMode>
-HyperParameterTuningJobConfig_TrainingJobEarlyStoppingType <TrainingJobEarlyStoppingType>
-HyperParameterTuningJobObjective_Type <HyperParameterTuningJobObjectiveType>
-WarmStartConfig_WarmStartType <HyperParameterTuningJobWarmStartType>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>

Description

Starts a hyperparameter tuning job. A hyperparameter tuning job finds the best version of a model by running many training jobs on your dataset using the algorithm you choose and values for hyperparameters within ranges that you specify. It then chooses the hyperparameter values that result in a model that performs the best, as measured by an objective metric that you choose.

Parameters

-AlgorithmSpecification_AlgorithmName <String>
The name of the resource algorithm to use for the hyperparameter tuning job. If you specify a value for this parameter, do not specify a value for TrainingImage.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTrainingJobDefinition_AlgorithmSpecification_AlgorithmName
-AlgorithmSpecification_MetricDefinition <MetricDefinition[]>
An array of MetricDefinition objects that specify the metrics that the algorithm emits.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTrainingJobDefinition_AlgorithmSpecification_MetricDefinitions
-AlgorithmSpecification_TrainingImage <String>
The registry path of the Docker image that contains the training algorithm. For information about Docker registry paths for built-in algorithms, see Algorithms Provided by Amazon SageMaker: Common Parameters. Amazon SageMaker supports both registry/repository[:tag] and registry/repository[@digest] image path formats. For more information, see Using Your Own Algorithms with Amazon SageMaker.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTrainingJobDefinition_AlgorithmSpecification_TrainingImage
-AlgorithmSpecification_TrainingInputMode <TrainingInputMode>
The input mode that the algorithm supports: File or Pipe. In File input mode, Amazon SageMaker downloads the training data from Amazon S3 to the storage volume that is attached to the training instance and mounts the directory to the Docker volume for the training container. In Pipe input mode, Amazon SageMaker streams data directly from Amazon S3 to the container. If you specify File mode, make sure that you provision the storage volume that is attached to the training instance with enough capacity to accommodate the training data downloaded from Amazon S3, the model artifacts, and intermediate information.For more information about input modes, see Algorithms.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTrainingJobDefinition_AlgorithmSpecification_TrainingInputMode
-CheckpointConfig_LocalPath <String>
(Optional) The local directory where checkpoints are written. The default directory is /opt/ml/checkpoints/.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTrainingJobDefinition_CheckpointConfig_LocalPath
-CheckpointConfig_S3Uri <String>
Identifies the S3 path where you want Amazon SageMaker to store checkpoints. For example, s3://bucket-name/key-name-prefix.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTrainingJobDefinition_CheckpointConfig_S3Uri
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-HyperParameterTuningJobConfig_Strategy <HyperParameterTuningJobStrategyType>
Specifies how hyperparameter tuning chooses the combinations of hyperparameter values to use for the training job it launches. To use the Bayesian search stategy, set this to Bayesian. To randomly search, set it to Random. For information about search strategies, see How Hyperparameter Tuning Works.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-HyperParameterTuningJobConfig_TrainingJobEarlyStoppingType <TrainingJobEarlyStoppingType>
Specifies whether to use early stopping for training jobs launched by the hyperparameter tuning job. This can be one of the following values (the default value is OFF):
OFF
Training jobs launched by the hyperparameter tuning job do not use early stopping.
AUTO
Amazon SageMaker stops training jobs launched by the hyperparameter tuning job when they are unlikely to perform better than previously completed training jobs. For more information, see Stop Training Jobs Early.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-HyperParameterTuningJobName <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. The name must have { } to { } characters. Valid characters are a-z, A-Z, 0-9, and : + = @ _ % - (hyphen). The name is not case sensitive.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-HyperParameterTuningJobObjective_MetricName <String>
The name of the metric to use for the objective metric.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesHyperParameterTuningJobConfig_HyperParameterTuningJobObjective_MetricName
-HyperParameterTuningJobObjective_Type <HyperParameterTuningJobObjectiveType>
Whether to minimize or maximize the objective metric.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesHyperParameterTuningJobConfig_HyperParameterTuningJobObjective_Type
-ParameterRanges_CategoricalParameterRange <CategoricalParameterRange[]>
The array of CategoricalParameterRange objects that specify ranges of categorical hyperparameters that a hyperparameter tuning job searches.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesHyperParameterTuningJobConfig_ParameterRanges_CategoricalParameterRanges
-ParameterRanges_ContinuousParameterRange <ContinuousParameterRange[]>
The array of ContinuousParameterRange objects that specify ranges of continuous hyperparameters that a hyperparameter tuning job searches.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesHyperParameterTuningJobConfig_ParameterRanges_ContinuousParameterRanges
-ParameterRanges_IntegerParameterRange <IntegerParameterRange[]>
The array of IntegerParameterRange objects that specify ranges of integer hyperparameters that a hyperparameter tuning job searches.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesHyperParameterTuningJobConfig_ParameterRanges_IntegerParameterRanges
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the HyperParameterTuningJobName parameter. The -PassThru parameter is deprecated, use -Select '^HyperParameterTuningJobName' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ResourceLimits_MaxNumberOfTrainingJob <Int32>
The maximum number of training jobs that a hyperparameter tuning job can launch.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesHyperParameterTuningJobConfig_ResourceLimits_MaxNumberOfTrainingJobs
-ResourceLimits_MaxParallelTrainingJob <Int32>
The maximum number of concurrent training jobs that a hyperparameter tuning job can launch.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesHyperParameterTuningJobConfig_ResourceLimits_MaxParallelTrainingJobs
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is 'HyperParameterTuningJobArn'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.SageMaker.Model.CreateHyperParameterTuningJobResponse). Specifying the name of a property of type Amazon.SageMaker.Model.CreateHyperParameterTuningJobResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StoppingCondition_MaxRuntimeInSecond <Int32>
The maximum length of time, in seconds, that the training or compilation job can run. If job does not complete during this time, Amazon SageMaker ends the job. If value is not specified, default value is 1 day. The maximum value is 28 days.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTrainingJobDefinition_StoppingCondition_MaxRuntimeInSeconds
-StoppingCondition_MaxWaitTimeInSecond <Int32>
The maximum length of time, in seconds, how long you are willing to wait for a managed spot training job to complete. It is the amount of time spent waiting for Spot capacity plus the amount of time the training job runs. It must be equal to or greater than MaxRuntimeInSeconds.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTrainingJobDefinition_StoppingCondition_MaxWaitTimeInSeconds
-Tag <Tag[]>
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 AWS Tagging Strategies.Tags that you specify for the tuning job are also added to all training jobs that the tuning job launches.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTags
-TrainingJobDefinition_EnableInterContainerTrafficEncryption <Boolean>
To encrypt all communications between ML compute instances in distributed training, choose True. Encryption provides greater security for distributed training, but training might take longer. How long it takes depends on the amount of communication between compute instances, especially if you use a deep learning algorithm in distributed training.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-TrainingJobDefinition_EnableManagedSpotTraining <Boolean>
A Boolean indicating whether managed spot training is enabled (True) or not (False).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-TrainingJobDefinition_EnableNetworkIsolation <Boolean>
Isolates the training container. No inbound or outbound network calls can be made, except for calls between peers within a training cluster for distributed training. If network isolation is used for training jobs that are configured to use a VPC, Amazon SageMaker downloads and uploads customer data and model artifacts through the specified VPC, but the training container does not have network access.The Semantic Segmentation built-in algorithm does not support network isolation.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-TrainingJobDefinition_InputDataConfig <Channel[]>
An array of Channel objects that specify the input for the training jobs that the tuning job launches.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-TrainingJobDefinition_OutputDataConfig <OutputDataConfig>
Specifies the path to the Amazon S3 bucket where you store model artifacts from the training jobs that the tuning job launches.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-TrainingJobDefinition_ResourceConfig <ResourceConfig>
The resources, including the compute instances and storage volumes, to use for the training jobs that the tuning job launches.Storage volumes store model artifacts and incremental states. Training algorithms might also use storage volumes for scratch space. If you want Amazon SageMaker to use the storage volume to store the training data, choose File as the TrainingInputMode in the algorithm specification. For distributed training algorithms, specify an instance count greater than 1.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-TrainingJobDefinition_RoleArn <String>
The Amazon Resource Name (ARN) of the IAM role associated with the training jobs that the tuning job launches.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-TrainingJobDefinition_StaticHyperParameter <Hashtable>
Specifies the values of hyperparameters that do not change for the tuning job.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTrainingJobDefinition_StaticHyperParameters
-VpcConfig_SecurityGroupId <String[]>
The VPC security group IDs, in the form sg-xxxxxxxx. Specify the security groups for the VPC that is specified in the Subnets field.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTrainingJobDefinition_VpcConfig_SecurityGroupIds
-VpcConfig_Subnet <String[]>
The ID of the subnets in the VPC to which you want to connect your training job or model. Amazon EC2 P3 accelerated computing instances are not available in the c/d/e availability zones of region us-east-1. If you want to create endpoints with P3 instances in VPC mode in region us-east-1, create subnets in a/b/f availability zones instead.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTrainingJobDefinition_VpcConfig_Subnets
-WarmStartConfig_ParentHyperParameterTuningJob <ParentHyperParameterTuningJob[]>
An array of hyperparameter tuning jobs that are used as the starting point for the new hyperparameter tuning job. For more information about warm starting a hyperparameter tuning job, see Using a Previous Hyperparameter Tuning Job as a Starting Point.Hyperparameter tuning jobs created before October 1, 2018 cannot be used as parent jobs for warm start tuning jobs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesWarmStartConfig_ParentHyperParameterTuningJobs
-WarmStartConfig_WarmStartType <HyperParameterTuningJobWarmStartType>
Specifies one of the following:
IDENTICAL_DATA_AND_ALGORITHM
The new hyperparameter tuning job uses the same input data and training image as the parent tuning jobs. You can change the hyperparameter ranges to search and the maximum number of training jobs that the hyperparameter tuning job launches. You cannot use a new version of the training algorithm, unless the changes in the new version do not affect the algorithm itself. For example, changes that improve logging or adding support for a different data format are allowed. You can also change hyperparameters from tunable to static, and from static to tunable, but the total number of static plus tunable hyperparameters must remain the same as it is in all parent jobs. The objective metric for the new tuning job must be the same as for all parent jobs.
TRANSFER_LEARNING
The new hyperparameter tuning job can include input data, hyperparameter ranges, maximum number of concurrent training jobs, and maximum number of training jobs that are different than those of its parent hyperparameter tuning jobs. The training image can also be a different version from the version used in the parent hyperparameter tuning job. You can also change hyperparameters from tunable to static, and from static to tunable, but the total number of static plus tunable hyperparameters must remain the same as it is in all parent jobs. The objective metric for the new tuning job must be the same as for all parent jobs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required? False
Position? Named
Accept pipeline input? True (ByPropertyName)
Aliases AK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required? False
Position? Named
Accept pipeline input? True (ByPropertyName)
-ProfileLocation <String>

Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)

If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials. Note that the encrypted credential file is not supported on all platforms. It will be skipped when searching for profiles on Windows Nano Server, Mac, and Linux platforms.

If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.

As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.

Required? False
Position? Named
Accept pipeline input? True (ByPropertyName)
Aliases AWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required? False
Position? Named
Accept pipeline input? True (ByPropertyName)
Aliases AWSProfileName, StoredCredentials
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required? False
Position? Named
Accept pipeline input? True (ByPropertyName)
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required? False
Position? Named
Accept pipeline input? True (ByPropertyName)
Aliases SecretAccessKey, SK
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required? False
Position? Named
Accept pipeline input? True (ByPropertyName)
Aliases ST
-Region <String>
The system name of the AWS region in which the operation should be invoked. For example, us-east-1, eu-west-1 etc.
Required? False
Position? Named
Accept pipeline input? True (ByPropertyName)
Aliases RegionToCall
-EndpointUrl <String>

The endpoint to make the call against.

Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.

Required? False
Position? Named
Accept pipeline input? True (ByPropertyName)

Inputs

You can pipe a String object to this cmdlet for the HyperParameterTuningJobName parameter.

Outputs

This cmdlet returns a System.String object. The service call response (type Amazon.SageMaker.Model.CreateHyperParameterTuningJobResponse) can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z