:doc:`LookoutEquipment <../../lookoutequipment>` / Client / list_model_versions

*******************
list_model_versions
*******************



.. py:method:: LookoutEquipment.Client.list_model_versions(**kwargs)

  

  Generates a list of all model versions for a given model, including the model version, model version ARN, and status. To list a subset of versions, use the ``MaxModelVersion`` and ``MinModelVersion`` fields.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/lookoutequipment-2020-12-15/ListModelVersions>`_  


  **Request Syntax**
  ::

    response = client.list_model_versions(
        ModelName='string',
        NextToken='string',
        MaxResults=123,
        Status='IN_PROGRESS'|'SUCCESS'|'FAILED'|'IMPORT_IN_PROGRESS'|'CANCELED',
        SourceType='TRAINING'|'RETRAINING'|'IMPORT',
        CreatedAtEndTime=datetime(2015, 1, 1),
        CreatedAtStartTime=datetime(2015, 1, 1),
        MaxModelVersion=123,
        MinModelVersion=123
    )
    
  :type ModelName: string
  :param ModelName: **[REQUIRED]** 

    Then name of the machine learning model for which the model versions are to be listed.

    

  
  :type NextToken: string
  :param NextToken: 

    If the total number of results exceeds the limit that the response can display, the response returns an opaque pagination token indicating where to continue the listing of machine learning model versions. Use this token in the ``NextToken`` field in the request to list the next page of results.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    Specifies the maximum number of machine learning model versions to list.

    

  
  :type Status: string
  :param Status: 

    Filter the results based on the current status of the model version.

    

  
  :type SourceType: string
  :param SourceType: 

    Filter the results based on the way the model version was generated.

    

  
  :type CreatedAtEndTime: datetime
  :param CreatedAtEndTime: 

    Filter results to return all the model versions created before this time.

    

  
  :type CreatedAtStartTime: datetime
  :param CreatedAtStartTime: 

    Filter results to return all the model versions created after this time.

    

  
  :type MaxModelVersion: integer
  :param MaxModelVersion: 

    Specifies the highest version of the model to return in the list.

    

  
  :type MinModelVersion: integer
  :param MinModelVersion: 

    Specifies the lowest version of the model to return in the list.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'NextToken': 'string',
          'ModelVersionSummaries': [
              {
                  'ModelName': 'string',
                  'ModelArn': 'string',
                  'ModelVersion': 123,
                  'ModelVersionArn': 'string',
                  'CreatedAt': datetime(2015, 1, 1),
                  'Status': 'IN_PROGRESS'|'SUCCESS'|'FAILED'|'IMPORT_IN_PROGRESS'|'CANCELED',
                  'SourceType': 'TRAINING'|'RETRAINING'|'IMPORT',
                  'ModelQuality': 'QUALITY_THRESHOLD_MET'|'CANNOT_DETERMINE_QUALITY'|'POOR_QUALITY_DETECTED'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **NextToken** *(string) --* 

        If the total number of results exceeds the limit that the response can display, the response returns an opaque pagination token indicating where to continue the listing of machine learning model versions. Use this token in the ``NextToken`` field in the request to list the next page of results.

        
      

      - **ModelVersionSummaries** *(list) --* 

        Provides information on the specified model version, including the created time, model and dataset ARNs, and status.

         

        .. note::

          

          If you don't supply the ``ModelName`` request parameter, or if you supply the name of a model that doesn't exist, ``ListModelVersions`` returns an empty array in ``ModelVersionSummaries``.

          

        
        

        - *(dict) --* 

          Contains information about the specific model version.

          
          

          - **ModelName** *(string) --* 

            The name of the model that this model version is a version of.

            
          

          - **ModelArn** *(string) --* 

            The Amazon Resource Name (ARN) of the model that this model version is a version of.

            
          

          - **ModelVersion** *(integer) --* 

            The version of the model.

            
          

          - **ModelVersionArn** *(string) --* 

            The Amazon Resource Name (ARN) of the model version.

            
          

          - **CreatedAt** *(datetime) --* 

            The time when this model version was created.

            
          

          - **Status** *(string) --* 

            The current status of the model version.

            
          

          - **SourceType** *(string) --* 

            Indicates how this model version was generated.

            
          

          - **ModelQuality** *(string) --* 

            Provides a quality assessment for a model that uses labels. If Lookout for Equipment determines that the model quality is poor based on training metrics, the value is ``POOR_QUALITY_DETECTED``. Otherwise, the value is ``QUALITY_THRESHOLD_MET``.

             

            If the model is unlabeled, the model quality can't be assessed and the value of ``ModelQuality`` is ``CANNOT_DETERMINE_QUALITY``. In this situation, you can get a model quality assessment by adding labels to the input dataset and retraining the model.

             

            For information about improving the quality of a model, see `Best practices with Amazon Lookout for Equipment <https://docs.aws.amazon.com/lookout-for-equipment/latest/ug/best-practices.html>`__.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`LookoutEquipment.Client.exceptions.ValidationException`

  
  *   :py:class:`LookoutEquipment.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`LookoutEquipment.Client.exceptions.ThrottlingException`

  
  *   :py:class:`LookoutEquipment.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`LookoutEquipment.Client.exceptions.InternalServerException`

  