Skip to main content

hyper_parameter_tuning_jobs

Creates, updates, deletes, gets or lists a hyper_parameter_tuning_jobs resource.

Overview

Namehyper_parameter_tuning_jobs
TypeResource
Idaws.sagemaker.hyper_parameter_tuning_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
autotuneobjectA flag to indicate if autotune is enabled for the hyperparameter tuning job.
best_training_jobobjectA TrainingJobSummary object that describes the training job that completed with the best current HyperParameterTuningJobObjective.
consumed_resourcesobjectThe total resources consumed by your hyperparameter tuning job.
creation_timestring (date-time)The date and time that the tuning job started.
failure_reasonstringIf the tuning job failed, the reason it failed.
hyper_parameter_tuning_end_timestring (date-time)The date and time that the tuning job ended.
hyper_parameter_tuning_job_arnstringThe Amazon Resource Name (ARN) of the tuning job. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:hyper-parameter-tuning-job/.*</code>)
hyper_parameter_tuning_job_configobjectThe HyperParameterTuningJobConfig object that specifies the configuration of the tuning job.
hyper_parameter_tuning_job_namestringThe name of the hyperparameter tuning job. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,31}</code>)
hyper_parameter_tuning_job_statusstringThe status of the tuning job. (Completed, InProgress, Failed, Stopped, Stopping, Deleting, DeleteFailed)
last_modified_timestring (date-time)The date and time that the status of the tuning job was modified.
objective_status_countersobjectThe ObjectiveStatusCounters object that specifies the number of training jobs, categorized by the status of their final objective metric, that this tuning job launched.
overall_best_training_jobobjectIf the hyperparameter tuning job is an warm start tuning job with a WarmStartType of IDENTICAL_DATA_AND_ALGORITHM, this is the TrainingJobSummary for the training job with the best objective metric value of all training jobs launched by this tuning job and all parent jobs specified for the warm start tuning job.
training_job_definitionobjectDefines the training jobs launched by a hyperparameter tuning job.
training_job_definitionsarrayA list of the HyperParameterTrainingJobDefinition objects launched for this tuning job.
training_job_status_countersobjectThe TrainingJobStatusCounters object that specifies the number of training jobs, categorized by status, that this tuning job launched.
tuning_job_completion_detailsobjectTuning job completion information returned as the response from a hyperparameter tuning job. This information tells if your tuning job has or has not converged. It also includes the number of training jobs that have not improved model performance as evaluated against the objective function.
warm_start_configobjectThe configuration for starting the hyperparameter parameter tuning job using one or more previous tuning jobs as a starting point. The results of previous tuning jobs are used to inform which combinations of hyperparameters to search over in the new tuning job.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_hyper_parameter_tuning_jobselectregionReturns a description of a hyperparameter tuning job, depending on the fields selected. These fields can include the name, Amazon Resource Name (ARN), job status of your tuning job and more.
list_hyper_parameter_tuning_jobsselectregionGets a list of HyperParameterTuningJobSummary objects that describe the hyperparameter tuning jobs launched in your account.
create_hyper_parameter_tuning_jobinsertregion, HyperParameterTuningJobName, HyperParameterTuningJobConfigStarts 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. A hyperparameter tuning job automatically creates Amazon SageMaker experiments, trials, and trial components for each training job that it runs. You can view these entities in Amazon SageMaker Studio. For more information, see View Experiments, Trials, and Trial Components. Do not include any security-sensitive information including account access IDs, secrets, or tokens in any hyperparameter fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by any security-sensitive information included in the request hyperparameter variable or plain text fields..
delete_hyper_parameter_tuning_jobdeleteregionDeletes a hyperparameter tuning job. The DeleteHyperParameterTuningJob API deletes only the tuning job entry that was created in SageMaker when you called the CreateHyperParameterTuningJob API. It does not delete training jobs, artifacts, or the IAM role that you specified when creating the model.
stop_hyper_parameter_tuning_jobexecregion, HyperParameterTuningJobNameStops a running hyperparameter tuning job and all running training jobs that the tuning job launched. All model artifacts output from the training jobs are stored in Amazon Simple Storage Service (Amazon S3). All data that the training jobs write to Amazon CloudWatch Logs are still available in CloudWatch. After the tuning job moves to the Stopped state, it releases all reserved resources for the tuning job.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns a description of a hyperparameter tuning job, depending on the fields selected. These fields can include the name, Amazon Resource Name (ARN), job status of your tuning job and more.

SELECT
autotune,
best_training_job,
consumed_resources,
creation_time,
failure_reason,
hyper_parameter_tuning_end_time,
hyper_parameter_tuning_job_arn,
hyper_parameter_tuning_job_config,
hyper_parameter_tuning_job_name,
hyper_parameter_tuning_job_status,
last_modified_time,
objective_status_counters,
overall_best_training_job,
training_job_definition,
training_job_definitions,
training_job_status_counters,
tuning_job_completion_details,
warm_start_config
FROM aws.sagemaker.hyper_parameter_tuning_jobs
WHERE region = '{{ region }}' -- required
;

INSERT examples

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. A hyperparameter tuning job automatically creates Amazon SageMaker experiments, trials, and trial components for each training job that it runs. You can view these entities in Amazon SageMaker Studio. For more information, see View Experiments, Trials, and Trial Components. Do not include any security-sensitive information including account access IDs, secrets, or tokens in any hyperparameter fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by any security-sensitive information included in the request hyperparameter variable or plain text fields..

INSERT INTO aws.sagemaker.hyper_parameter_tuning_jobs (
HyperParameterTuningJobName,
HyperParameterTuningJobConfig,
TrainingJobDefinition,
TrainingJobDefinitions,
WarmStartConfig,
Tags,
Autotune,
region
)
SELECT
'{{ HyperParameterTuningJobName }}' /* required */,
'{{ HyperParameterTuningJobConfig }}' /* required */,
'{{ TrainingJobDefinition }}',
'{{ TrainingJobDefinitions }}',
'{{ WarmStartConfig }}',
'{{ Tags }}',
'{{ Autotune }}',
'{{ region }}'
RETURNING
hyper_parameter_tuning_job_arn
;

DELETE examples

Deletes a hyperparameter tuning job. The DeleteHyperParameterTuningJob API deletes only the tuning job entry that was created in SageMaker when you called the CreateHyperParameterTuningJob API. It does not delete training jobs, artifacts, or the IAM role that you specified when creating the model.

DELETE FROM aws.sagemaker.hyper_parameter_tuning_jobs
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Stops a running hyperparameter tuning job and all running training jobs that the tuning job launched. All model artifacts output from the training jobs are stored in Amazon Simple Storage Service (Amazon S3). All data that the training jobs write to Amazon CloudWatch Logs are still available in CloudWatch. After the tuning job moves to the Stopped state, it releases all reserved resources for the tuning job.

EXEC aws.sagemaker.hyper_parameter_tuning_jobs.stop_hyper_parameter_tuning_job
@region='{{ region }}' --required
@@json=
'{
"HyperParameterTuningJobName": "{{ HyperParameterTuningJobName }}"
}'
;