SageMaker / Client / list_training_jobs_for_hyper_parameter_tuning_job

list_training_jobs_for_hyper_parameter_tuning_job#

SageMaker.Client.list_training_jobs_for_hyper_parameter_tuning_job(**kwargs)#

Gets a list of TrainingJobSummary objects that describe the training jobs that a hyperparameter tuning job launched.

See also: AWS API Documentation

Request Syntax

response = client.list_training_jobs_for_hyper_parameter_tuning_job(
    HyperParameterTuningJobName='string',
    NextToken='string',
    MaxResults=123,
    StatusEquals='InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped',
    SortBy='Name'|'CreationTime'|'Status'|'FinalObjectiveMetricValue',
    SortOrder='Ascending'|'Descending'
)
Parameters:
  • HyperParameterTuningJobName (string) –

    [REQUIRED]

    The name of the tuning job whose training jobs you want to list.

  • NextToken (string) – If the result of the previous ListTrainingJobsForHyperParameterTuningJob request was truncated, the response includes a NextToken. To retrieve the next set of training jobs, use the token in the next request.

  • MaxResults (integer) – The maximum number of training jobs to return. The default value is 10.

  • StatusEquals (string) – A filter that returns only training jobs with the specified status.

  • SortBy (string) –

    The field to sort results by. The default is Name.

    If the value of this field is FinalObjectiveMetricValue, any training jobs that did not return an objective metric are not listed.

  • SortOrder (string) – The sort order for results. The default is Ascending.

Return type:

dict

Returns:

Response Syntax

{
    'TrainingJobSummaries': [
        {
            'TrainingJobDefinitionName': 'string',
            'TrainingJobName': 'string',
            'TrainingJobArn': 'string',
            'TuningJobName': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'TrainingStartTime': datetime(2015, 1, 1),
            'TrainingEndTime': datetime(2015, 1, 1),
            'TrainingJobStatus': 'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped',
            'TunedHyperParameters': {
                'string': 'string'
            },
            'FailureReason': 'string',
            'FinalHyperParameterTuningJobObjectiveMetric': {
                'Type': 'Maximize'|'Minimize',
                'MetricName': 'string',
                'Value': ...
            },
            'ObjectiveStatus': 'Succeeded'|'Pending'|'Failed'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • TrainingJobSummaries (list) –

      A list of TrainingJobSummary objects that describe the training jobs that the ListTrainingJobsForHyperParameterTuningJob request returned.

      • (dict) –

        The container for the summary information about a training job.

        • TrainingJobDefinitionName (string) –

          The training job definition name.

        • TrainingJobName (string) –

          The name of the training job.

        • TrainingJobArn (string) –

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

        • TuningJobName (string) –

          The HyperParameter tuning job that launched the training job.

        • CreationTime (datetime) –

          The date and time that the training job was created.

        • TrainingStartTime (datetime) –

          The date and time that the training job started.

        • TrainingEndTime (datetime) –

          Specifies the time when the training job ends on training instances. You are billed for the time interval between the value of TrainingStartTime and this time. For successful jobs and stopped jobs, this is the time after model artifacts are uploaded. For failed jobs, this is the time when SageMaker detects a job failure.

        • TrainingJobStatus (string) –

          The status of the training job.

        • TunedHyperParameters (dict) –

          A list of the hyperparameters for which you specified ranges to search.

          • (string) –

            • (string) –

        • FailureReason (string) –

          The reason that the training job failed.

        • FinalHyperParameterTuningJobObjectiveMetric (dict) –

          The FinalHyperParameterTuningJobObjectiveMetric object that specifies the value of the objective metric of the tuning job that launched this training job.

          • Type (string) –

            Select if you want to minimize or maximize the objective metric during hyperparameter tuning.

          • MetricName (string) –

            The name of the objective metric. For SageMaker built-in algorithms, metrics are defined per algorithm. See the metrics for XGBoost as an example. You can also use a custom algorithm for training and define your own metrics. For more information, see Define metrics and environment variables.

          • Value (float) –

            The value of the objective metric.

        • ObjectiveStatus (string) –

          The status of the objective metric for the training job:

          • Succeeded: The final objective metric for the training job was evaluated by the hyperparameter tuning job and used in the hyperparameter tuning process.

          • Pending: The training job is in progress and evaluation of its final objective metric is pending.

          • Failed: The final objective metric for the training job was not evaluated, and was not used in the hyperparameter tuning process. This typically occurs when the training job failed or did not emit an objective metric.

    • NextToken (string) –

      If the result of this ListTrainingJobsForHyperParameterTuningJob request was truncated, the response includes a NextToken. To retrieve the next set of training jobs, use the token in the next request.

Exceptions