Skip to main content

models

Creates, updates, deletes, gets or lists a models resource.

Overview

Namemodels
TypeResource
Idaws.lookoutequipment.models

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
accumulated_inference_data_end_timestring (date-time)Indicates the end time of the inference data that has been accumulated.
accumulated_inference_data_start_timestring (date-time)Indicates the start time of the inference data that has been accumulated.
active_model_versioninteger (int64)The name of the model version used by the inference schedular when running a scheduled inference execution.
active_model_version_arnstringThe Amazon Resource Name (ARN) of the model version used by the inference scheduler when running a scheduled inference execution. (pattern: <code>^arn:aws(-[^:]+)?:lookoutequipment:[a-zA-Z0-9-]*:[0-9]{12}:model/[0-9a-zA-Z_-]{1,200}/.+/model-version/[0-9]{1,}$</code>)
created_atstring (date-time)Indicates the time and date at which the machine learning model was created.
data_pre_processing_configurationobjectThe configuration is the TargetSamplingRate, which is the sampling rate of the data after post processing by Amazon Lookout for Equipment. For example, if you provide data that has been collected at a 1 second level and you want the system to resample the data at a 1 minute rate before training, the TargetSamplingRate is 1 minute. When providing a value for the TargetSamplingRate, you must attach the prefix "PT" to the rate you want. The value for a 1 second rate is therefore PT1S, the value for a 15 minute rate is PT15M, and the value for a 1 hour rate is PT1H
dataset_arnstringThe Amazon Resouce Name (ARN) of the dataset used to create the machine learning model being described. (pattern: <code>arn:aws(-[^:]+)?:lookoutequipment:[a-zA-Z0-9-]*:[0-9]{12}:dataset/[0-9a-zA-Z_-]{1,200}/.+</code>)
dataset_namestringThe name of the dataset being used by the machine learning being described. (pattern: <code>^[0-9a-zA-Z_-]{1,200}$</code>)
evaluation_data_end_timestring (date-time)Indicates the time reference in the dataset that was used to end the subset of evaluation data for the machine learning model.
evaluation_data_start_timestring (date-time)Indicates the time reference in the dataset that was used to begin the subset of evaluation data for the machine learning model.
failed_reasonstringIf the training of the machine learning model failed, this indicates the reason for that failure. (pattern: <code>[\P{M}\p{M}]{1,5000}</code>)
import_job_end_timestring (date-time)The date and time when the import job was completed. This field appears if the active model version was imported.
import_job_start_timestring (date-time)The date and time when the import job was started. This field appears if the active model version was imported.
labels_input_configurationobjectSpecifies configuration information about the labels input, including its S3 location.
last_updated_timestring (date-time)Indicates the last time the machine learning model was updated. The type of update is not specified.
latest_scheduled_retraining_available_data_in_daysintegerIndicates the number of days of data used in the most recent scheduled retraining run.
latest_scheduled_retraining_failed_reasonstringIf the model version was generated by retraining and the training failed, this indicates the reason for that failure. (pattern: <code>[\P{M}\p{M}]{1,5000}</code>)
latest_scheduled_retraining_model_versioninteger (int64)Indicates the most recent model version that was generated by retraining.
latest_scheduled_retraining_start_timestring (date-time)Indicates the start time of the most recent scheduled retraining run.
latest_scheduled_retraining_statusstringIndicates the status of the most recent scheduled retraining run. (IN_PROGRESS, SUCCESS, FAILED, IMPORT_IN_PROGRESS, CANCELED)
model_arnstringThe Amazon Resource Name (ARN) of the machine learning model being described. (pattern: <code>arn:aws(-[^:]+)?:lookoutequipment:[a-zA-Z0-9-]*:[0-9]{12}:model/.+</code>)
model_diagnostics_output_configurationobjectConfiguration information for the model's pointwise model diagnostics.
model_metricsstringThe Model Metrics show an aggregated summary of the model's performance within the evaluation time range. This is the JSON content of the metrics created when evaluating the model.
model_namestringThe name of the machine learning model being described. (pattern: <code>^[0-9a-zA-Z_-]{1,200}$</code>)
model_qualitystringProvides 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 using labels with your models, see Understanding labeling. For information about improving the quality of a model, see Best practices with Amazon Lookout for Equipment. (QUALITY_THRESHOLD_MET, CANNOT_DETERMINE_QUALITY, POOR_QUALITY_DETECTED)
model_version_activated_atstring (date-time)The date the active model version was activated.
next_scheduled_retraining_start_datestring (date-time)Indicates the date and time that the next scheduled retraining run will start on. Lookout for Equipment truncates the time you provide to the nearest UTC day.
off_conditionstringIndicates that the asset associated with this sensor has been shut off. As long as this condition is met, Lookout for Equipment will not use data from this asset for training, evaluation, or inference.
previous_active_model_versioninteger (int64)The model version that was set as the active model version prior to the current active model version.
previous_active_model_version_arnstringThe ARN of the model version that was set as the active model version prior to the current active model version. (pattern: <code>^arn:aws(-[^:]+)?:lookoutequipment:[a-zA-Z0-9-]*:[0-9]{12}:model/[0-9a-zA-Z_-]{1,200}/.+/model-version/[0-9]{1,}$</code>)
previous_model_version_activated_atstring (date-time)The date and time when the previous active model version was activated.
prior_model_metricsstringIf the model version was retrained, this field shows a summary of the performance of the prior model on the new training range. You can use the information in this JSON-formatted object to compare the new model version and the prior model version.
retraining_scheduler_statusstringIndicates the status of the retraining scheduler. (PENDING, RUNNING, STOPPING, STOPPED)
role_arnstringThe Amazon Resource Name (ARN) of a role with permission to access the data source for the machine learning model being described. (pattern: <code>arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+</code>)
schemastringA JSON description of the data that is in each time series dataset, including names, column names, and data types.
server_side_kms_key_idstringProvides the identifier of the KMS key used to encrypt model data by Amazon Lookout for Equipment. (pattern: <code>arn:aws[a-z-]:kms:[a-z0-9-]:\d{12}:[\w-/]+</code>)
source_model_version_arnstringThe Amazon Resource Name (ARN) of the source model version. This field appears if the active model version was imported. (pattern: <code>^arn:aws(-[^:]+)?:lookoutequipment:[a-zA-Z0-9-]*:[0-9]{12}:model/[0-9a-zA-Z_-]{1,200}/.+/model-version/[0-9]{1,}$</code>)
statusstringSpecifies the current status of the model being described. Status describes the status of the most recent action of the model. (IN_PROGRESS, SUCCESS, FAILED, IMPORT_IN_PROGRESS)
training_data_end_timestring (date-time)Indicates the time reference in the dataset that was used to end the subset of training data for the machine learning model.
training_data_start_timestring (date-time)Indicates the time reference in the dataset that was used to begin the subset of training data for the machine learning model.
training_execution_end_timestring (date-time)Indicates the time at which the training of the machine learning model was completed.
training_execution_start_timestring (date-time)Indicates the time at which the training of the machine learning model began.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_modelselectregionProvides a JSON containing the overall information about a specific machine learning model, including model name and ARN, dataset, training and evaluation information, status, and so on.
list_modelsselectregionGenerates a list of all models in the account, including model name and ARN, dataset, and status.
create_modelinsertregion, ModelName, DatasetName, ClientTokenCreates a machine learning model for data inference. A machine-learning (ML) model is a mathematical model that finds patterns in your data. In Amazon Lookout for Equipment, the model learns the patterns of normal behavior and detects abnormal behavior that could be potential equipment failure (or maintenance events). The models are made by analyzing normal data and abnormalities in machine behavior that have already occurred. Your model is trained using a portion of the data from your dataset and uses that data to learn patterns of normal behavior and abnormal patterns that lead to equipment failure. Another portion of the data is used to evaluate the model's accuracy.
update_modelupdateregion, ModelNameUpdates a model in the account.
delete_modeldeleteregionDeletes a machine learning model currently available for Amazon Lookout for Equipment. This will prevent it from being used with an inference scheduler, even one that is already set up.
import_model_versionexecregion, SourceModelVersionArn, DatasetName, ClientTokenImports a model that has been trained successfully.
start_retraining_schedulerexecregion, ModelNameStarts a retraining scheduler.
stop_retraining_schedulerexecregion, ModelNameStops a retraining scheduler.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Provides a JSON containing the overall information about a specific machine learning model, including model name and ARN, dataset, training and evaluation information, status, and so on.

SELECT
accumulated_inference_data_end_time,
accumulated_inference_data_start_time,
active_model_version,
active_model_version_arn,
created_at,
data_pre_processing_configuration,
dataset_arn,
dataset_name,
evaluation_data_end_time,
evaluation_data_start_time,
failed_reason,
import_job_end_time,
import_job_start_time,
labels_input_configuration,
last_updated_time,
latest_scheduled_retraining_available_data_in_days,
latest_scheduled_retraining_failed_reason,
latest_scheduled_retraining_model_version,
latest_scheduled_retraining_start_time,
latest_scheduled_retraining_status,
model_arn,
model_diagnostics_output_configuration,
model_metrics,
model_name,
model_quality,
model_version_activated_at,
next_scheduled_retraining_start_date,
off_condition,
previous_active_model_version,
previous_active_model_version_arn,
previous_model_version_activated_at,
prior_model_metrics,
retraining_scheduler_status,
role_arn,
schema,
server_side_kms_key_id,
source_model_version_arn,
status,
training_data_end_time,
training_data_start_time,
training_execution_end_time,
training_execution_start_time
FROM aws.lookoutequipment.models
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a machine learning model for data inference. A machine-learning (ML) model is a mathematical model that finds patterns in your data. In Amazon Lookout for Equipment, the model learns the patterns of normal behavior and detects abnormal behavior that could be potential equipment failure (or maintenance events). The models are made by analyzing normal data and abnormalities in machine behavior that have already occurred. Your model is trained using a portion of the data from your dataset and uses that data to learn patterns of normal behavior and abnormal patterns that lead to equipment failure. Another portion of the data is used to evaluate the model's accuracy.

INSERT INTO aws.lookoutequipment.models (
ModelName,
DatasetName,
DatasetSchema,
LabelsInputConfiguration,
ClientToken,
TrainingDataStartTime,
TrainingDataEndTime,
EvaluationDataStartTime,
EvaluationDataEndTime,
RoleArn,
DataPreProcessingConfiguration,
ServerSideKmsKeyId,
Tags,
OffCondition,
ModelDiagnosticsOutputConfiguration,
region
)
SELECT
'{{ ModelName }}' /* required */,
'{{ DatasetName }}' /* required */,
'{{ DatasetSchema }}',
'{{ LabelsInputConfiguration }}',
'{{ ClientToken }}' /* required */,
'{{ TrainingDataStartTime }}',
'{{ TrainingDataEndTime }}',
'{{ EvaluationDataStartTime }}',
'{{ EvaluationDataEndTime }}',
'{{ RoleArn }}',
'{{ DataPreProcessingConfiguration }}',
'{{ ServerSideKmsKeyId }}',
'{{ Tags }}',
'{{ OffCondition }}',
'{{ ModelDiagnosticsOutputConfiguration }}',
'{{ region }}'
RETURNING
model_arn,
status
;

UPDATE examples

Updates a model in the account.

UPDATE aws.lookoutequipment.models
SET
ModelName = '{{ ModelName }}',
LabelsInputConfiguration = '{{ LabelsInputConfiguration }}',
RoleArn = '{{ RoleArn }}',
ModelDiagnosticsOutputConfiguration = '{{ ModelDiagnosticsOutputConfiguration }}'
WHERE
region = '{{ region }}' --required
AND ModelName = '{{ ModelName }}' --required;

DELETE examples

Deletes a machine learning model currently available for Amazon Lookout for Equipment. This will prevent it from being used with an inference scheduler, even one that is already set up.

DELETE FROM aws.lookoutequipment.models
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Imports a model that has been trained successfully.

EXEC aws.lookoutequipment.models.import_model_version
@region='{{ region }}' --required
@@json=
'{
"SourceModelVersionArn": "{{ SourceModelVersionArn }}",
"ModelName": "{{ ModelName }}",
"DatasetName": "{{ DatasetName }}",
"LabelsInputConfiguration": "{{ LabelsInputConfiguration }}",
"ClientToken": "{{ ClientToken }}",
"RoleArn": "{{ RoleArn }}",
"ServerSideKmsKeyId": "{{ ServerSideKmsKeyId }}",
"Tags": "{{ Tags }}",
"InferenceDataImportStrategy": "{{ InferenceDataImportStrategy }}"
}'
;