LookoutEquipment / Client / import_model_version

import_model_version

LookoutEquipment.Client.import_model_version(**kwargs)

Imports a model that has been trained successfully.

Danger

This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.

See also: AWS API Documentation

Request Syntax

response = client.import_model_version(
    SourceModelVersionArn='string',
    ModelName='string',
    DatasetName='string',
    LabelsInputConfiguration={
        'S3InputConfiguration': {
            'Bucket': 'string',
            'Prefix': 'string'
        },
        'LabelGroupName': 'string'
    },
    ClientToken='string',
    RoleArn='string',
    ServerSideKmsKeyId='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    InferenceDataImportStrategy='NO_IMPORT'|'ADD_WHEN_EMPTY'|'OVERWRITE'
)
Parameters:
  • SourceModelVersionArn (string) –

    [REQUIRED]

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

  • ModelName (string) – The name for the machine learning model to be created. If the model already exists, Amazon Lookout for Equipment creates a new version. If you do not specify this field, it is filled with the name of the source model.

  • DatasetName (string) –

    [REQUIRED]

    The name of the dataset for the machine learning model being imported.

  • LabelsInputConfiguration (dict) –

    Contains the configuration information for the S3 location being used to hold label data.

    • S3InputConfiguration (dict) –

      Contains location information for the S3 location being used for label data.

      • Bucket (string) – [REQUIRED]

        The name of the S3 bucket holding the label data.

      • Prefix (string) –

        The prefix for the S3 bucket used for the label data.

    • LabelGroupName (string) –

      The name of the label group to be used for label data.

  • ClientToken (string) –

    [REQUIRED]

    A unique identifier for the request. If you do not set the client request token, Amazon Lookout for Equipment generates one.

    This field is autopopulated if not provided.

  • RoleArn (string) – The Amazon Resource Name (ARN) of a role with permission to access the data source being used to create the machine learning model.

  • ServerSideKmsKeyId (string) – Provides the identifier of the KMS key key used to encrypt model data by Amazon Lookout for Equipment.

  • Tags (list) –

    The tags associated with the machine learning model to be created.

    • (dict) –

      A tag is a key-value pair that can be added to a resource as metadata.

      • Key (string) – [REQUIRED]

        The key for the specified tag.

      • Value (string) – [REQUIRED]

        The value for the specified tag.

  • InferenceDataImportStrategy (string) –

    Indicates how to import the accumulated inference data when a model version is imported. The possible values are as follows:

    • NO_IMPORT – Don’t import the data.

    • ADD_WHEN_EMPTY – Only import the data from the source model if there is no existing data in the target model.

    • OVERWRITE – Import the data from the source model and overwrite the existing data in the target model.

Return type:

dict

Returns:

Response Syntax

{
    'ModelName': 'string',
    'ModelArn': 'string',
    'ModelVersionArn': 'string',
    'ModelVersion': 123,
    'Status': 'IN_PROGRESS'|'SUCCESS'|'FAILED'|'IMPORT_IN_PROGRESS'|'CANCELED'
}

Response Structure

  • (dict) –

    • ModelName (string) –

      The name for the machine learning model.

    • ModelArn (string) –

      The Amazon Resource Name (ARN) of the model being created.

    • ModelVersionArn (string) –

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

    • ModelVersion (integer) –

      The version of the model being created.

    • Status (string) –

      The status of the ImportModelVersion operation.

Exceptions