:doc:`SageMaker <../../sagemaker>` / Paginator / ListTrainingJobs

****************
ListTrainingJobs
****************



.. py:class:: SageMaker.Paginator.ListTrainingJobs

  ::

    
    paginator = client.get_paginator('list_training_jobs')

  
  

  .. py:method:: paginate(**kwargs)

    Creates an iterator that will paginate through responses from :py:meth:`SageMaker.Client.list_training_jobs`.

    See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ListTrainingJobs>`_    


    **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'|'Deleting',
          SortBy='Name'|'CreationTime'|'Status',
          SortOrder='Ascending'|'Descending',
          WarmPoolStatusEquals='Available'|'Terminated'|'Reused'|'InUse',
          TrainingPlanArnEquals='string',
          PaginationConfig={
              'MaxItems': 123,
              'PageSize': 123,
              'StartingToken': 'string'
          }
      )
      
    :type CreationTimeAfter: datetime
    :param CreationTimeAfter: 

      A filter that returns only training jobs created after the specified time (timestamp).

      

    
    :type CreationTimeBefore: datetime
    :param CreationTimeBefore: 

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

      

    
    :type LastModifiedTimeAfter: datetime
    :param LastModifiedTimeAfter: 

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

      

    
    :type LastModifiedTimeBefore: datetime
    :param LastModifiedTimeBefore: 

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

      

    
    :type NameContains: string
    :param NameContains: 

      A string in the training job name. This filter returns only training jobs whose name contains the specified string.

      

    
    :type StatusEquals: string
    :param StatusEquals: 

      A filter that retrieves only training jobs with a specific status.

      

    
    :type SortBy: string
    :param SortBy: 

      The field to sort results by. The default is ``CreationTime``.

      

    
    :type SortOrder: string
    :param SortOrder: 

      The sort order for results. The default is ``Ascending``.

      

    
    :type WarmPoolStatusEquals: string
    :param WarmPoolStatusEquals: 

      A filter that retrieves only training jobs with a specific warm pool status.

      

    
    :type TrainingPlanArnEquals: string
    :param TrainingPlanArnEquals: 

      The Amazon Resource Name (ARN); of the training plan to filter training jobs by. For more information about reserving GPU capacity for your SageMaker training jobs using Amazon SageMaker Training Plan, see ``CreateTrainingPlan ``.

      

    
    :type PaginationConfig: dict
    :param PaginationConfig: 

      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.

        

      
    
    
    :rtype: 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'|'Deleting',
                    'SecondaryStatus': 'Starting'|'LaunchingMLInstances'|'PreparingTrainingStack'|'Downloading'|'DownloadingTrainingImage'|'Training'|'Uploading'|'Stopping'|'Stopped'|'MaxRuntimeExceeded'|'Completed'|'Failed'|'Interrupted'|'MaxWaitTimeExceeded'|'Updating'|'Restarting'|'Pending',
                    'WarmPoolStatus': {
                        'Status': 'Available'|'Terminated'|'Reused'|'InUse',
                        'ResourceRetainedBillableTimeInSeconds': 123,
                        'ReusedByJob': 'string'
                    },
                    'TrainingPlanArn': '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.

              
            

            - **SecondaryStatus** *(string) --* 

              The secondary 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.

                
          
            

            - **TrainingPlanArn** *(string) --* 

              The Amazon Resource Name (ARN); of the training plan associated with this training job.

               

              For more information about how to reserve GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see ``CreateTrainingPlan ``.

              
        
      
    