SageMaker / Paginator / ListTrainingJobs

ListTrainingJobs#

class SageMaker.Paginator.ListTrainingJobs#
paginator = client.get_paginator('list_training_jobs')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from SageMaker.Client.list_training_jobs().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    CreationTimeAfter=datetime(2015, 1, 1),
    CreationTimeBefore=datetime(2015, 1, 1),
    LastModifiedTimeAfter=datetime(2015, 1, 1),
    LastModifiedTimeBefore=datetime(2015, 1, 1),
    NameContains='string',
    StatusEquals='InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped',
    SortBy='Name'|'CreationTime'|'Status',
    SortOrder='Ascending'|'Descending',
    WarmPoolStatusEquals='Available'|'Terminated'|'Reused'|'InUse',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • CreationTimeAfter (datetime) – A filter that returns only training jobs created after the specified time (timestamp).

  • CreationTimeBefore (datetime) – A filter that returns only training jobs created before the specified time (timestamp).

  • LastModifiedTimeAfter (datetime) – A filter that returns only training jobs modified after the specified time (timestamp).

  • LastModifiedTimeBefore (datetime) – A filter that returns only training jobs modified before the specified time (timestamp).

  • NameContains (string) – A string in the training job name. This filter returns only training jobs whose name contains the specified string.

  • StatusEquals (string) – A filter that retrieves only training jobs with a specific status.

  • SortBy (string) – The field to sort results by. The default is CreationTime.

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

  • WarmPoolStatusEquals (string) – A filter that retrieves only training jobs with a specific warm pool status.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'TrainingJobSummaries': [
        {
            'TrainingJobName': 'string',
            'TrainingJobArn': 'string',
            'CreationTime': datetime(2015, 1, 1),
            'TrainingEndTime': datetime(2015, 1, 1),
            'LastModifiedTime': datetime(2015, 1, 1),
            'TrainingJobStatus': 'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped',
            'WarmPoolStatus': {
                'Status': 'Available'|'Terminated'|'Reused'|'InUse',
                'ResourceRetainedBillableTimeInSeconds': 123,
                'ReusedByJob': 'string'
            }
        },
    ],

}

Response Structure

  • (dict) –

    • TrainingJobSummaries (list) –

      An array of TrainingJobSummary objects, each listing a training job.

      • (dict) –

        Provides summary information about a training job.

        • TrainingJobName (string) –

          The name of the training job that you want a summary for.

        • TrainingJobArn (string) –

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

        • CreationTime (datetime) –

          A timestamp that shows when the training job was created.

        • TrainingEndTime (datetime) –

          A timestamp that shows when the training job ended. This field is set only if the training job has one of the terminal statuses ( Completed, Failed, or Stopped).

        • LastModifiedTime (datetime) –

          Timestamp when the training job was last modified.

        • TrainingJobStatus (string) –

          The status of the training job.

        • WarmPoolStatus (dict) –

          The status of the warm pool associated with the training job.

          • Status (string) –

            The status of the warm pool.

            • InUse: The warm pool is in use for the training job.

            • Available: The warm pool is available to reuse for a matching training job.

            • Reused: The warm pool moved to a matching training job for reuse.

            • Terminated: The warm pool is no longer available. Warm pools are unavailable if they are terminated by a user, terminated for a patch update, or terminated for exceeding the specified KeepAlivePeriodInSeconds.

          • ResourceRetainedBillableTimeInSeconds (integer) –

            The billable time in seconds used by the warm pool. Billable time refers to the absolute wall-clock time.

            Multiply ResourceRetainedBillableTimeInSeconds by the number of instances ( InstanceCount) in your training cluster to get the total compute time SageMaker bills you if you run warm pool training. The formula is as follows: ResourceRetainedBillableTimeInSeconds * InstanceCount.

          • ReusedByJob (string) –

            The name of the matching training job that reused the warm pool.