Skip to main content

flywheels

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

Overview

Nameflywheels
TypeResource
Idaws.comprehend.flywheels

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
active_model_arnstringThe Amazon Resource Number (ARN) of the active model version. (pattern: <code>arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]:[0-9]{12}:(document-classifier|entity-recognizer)/[a-zA-Z0-9](-[a-zA-Z0-9])(/version/[a-zA-Z0-9](-[a-zA-Z0-9])*)?</code>)
creation_timestring (date-time)Creation time of the flywheel.
data_access_role_arnstringThe Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend permission to access the flywheel data. (pattern: <code>arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+</code>)
data_lake_s3_uristringAmazon S3 URI of the data lake location. (pattern: <code>s3:​//[a-z0-9][.-a-z0-9]{1,61}[a-z0-9](/.*)?</code>)
data_security_configobjectData security configuration.
flywheel_arnstringThe Amazon Resource Number (ARN) of the flywheel. (pattern: <code>arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]:[0-9]{12}:flywheel/[a-zA-Z0-9](-[a-zA-Z0-9])*</code>)
last_modified_timestring (date-time)Last modified time for the flywheel.
latest_flywheel_iterationstringThe most recent flywheel iteration. (pattern: <code>[0-9]{8}T[0-9]{6}Z</code>)
messagestringA description of the status of the flywheel.
model_typestringModel type of the flywheel's model. (DOCUMENT_CLASSIFIER, ENTITY_RECOGNIZER)
statusstringThe status of the flywheel. (CREATING, ACTIVE, UPDATING, DELETING, FAILED)
task_configobjectConfiguration about the model associated with a flywheel.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_flywheelselectregionProvides configuration information about the flywheel. For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide.
list_flywheelsselectregionGets a list of the flywheels that you have created.
create_flywheelinsertregion, FlywheelName, DataAccessRoleArn, DataLakeS3UriA flywheel is an Amazon Web Services resource that orchestrates the ongoing training of a model for custom classification or custom entity recognition. You can create a flywheel to start with an existing trained model, or Comprehend can create and train a new model. When you create the flywheel, Comprehend creates a data lake in your account. The data lake holds the training data and test data for all versions of the model. To use a flywheel with an existing trained model, you specify the active model version. Comprehend copies the model's training data and test data into the flywheel's data lake. To use the flywheel with a new model, you need to provide a dataset for training data (and optional test data) when you create the flywheel. For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide.
update_flywheelupdateregion, FlywheelArnUpdate the configuration information for an existing flywheel.
delete_flywheeldeleteregionDeletes a flywheel. When you delete the flywheel, Amazon Comprehend does not delete the data lake or the model associated with the flywheel. For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide.
start_flywheel_iterationexecregion, FlywheelArnStart the flywheel iteration.This operation uses any new datasets to train a new model version. For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide.

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 configuration information about the flywheel. For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide.

SELECT
active_model_arn,
creation_time,
data_access_role_arn,
data_lake_s3_uri,
data_security_config,
flywheel_arn,
last_modified_time,
latest_flywheel_iteration,
message,
model_type,
status,
task_config
FROM aws.comprehend.flywheels
WHERE region = '{{ region }}' -- required
;

INSERT examples

A flywheel is an Amazon Web Services resource that orchestrates the ongoing training of a model for custom classification or custom entity recognition. You can create a flywheel to start with an existing trained model, or Comprehend can create and train a new model. When you create the flywheel, Comprehend creates a data lake in your account. The data lake holds the training data and test data for all versions of the model. To use a flywheel with an existing trained model, you specify the active model version. Comprehend copies the model's training data and test data into the flywheel's data lake. To use the flywheel with a new model, you need to provide a dataset for training data (and optional test data) when you create the flywheel. For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide.

INSERT INTO aws.comprehend.flywheels (
FlywheelName,
ActiveModelArn,
DataAccessRoleArn,
TaskConfig,
ModelType,
DataLakeS3Uri,
DataSecurityConfig,
ClientRequestToken,
Tags,
region
)
SELECT
'{{ FlywheelName }}' /* required */,
'{{ ActiveModelArn }}',
'{{ DataAccessRoleArn }}' /* required */,
'{{ TaskConfig }}',
'{{ ModelType }}',
'{{ DataLakeS3Uri }}' /* required */,
'{{ DataSecurityConfig }}',
'{{ ClientRequestToken }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
active_model_arn,
flywheel_arn
;

UPDATE examples

Update the configuration information for an existing flywheel.

UPDATE aws.comprehend.flywheels
SET
FlywheelArn = '{{ FlywheelArn }}',
ActiveModelArn = '{{ ActiveModelArn }}',
DataAccessRoleArn = '{{ DataAccessRoleArn }}',
DataSecurityConfig = '{{ DataSecurityConfig }}'
WHERE
region = '{{ region }}' --required
AND FlywheelArn = '{{ FlywheelArn }}' --required
RETURNING
flywheel_properties;

DELETE examples

Deletes a flywheel. When you delete the flywheel, Amazon Comprehend does not delete the data lake or the model associated with the flywheel. For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide.

DELETE FROM aws.comprehend.flywheels
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Start the flywheel iteration.This operation uses any new datasets to train a new model version. For more information about flywheels, see Flywheel overview in the Amazon Comprehend Developer Guide.

EXEC aws.comprehend.flywheels.start_flywheel_iteration
@region='{{ region }}' --required
@@json=
'{
"FlywheelArn": "{{ FlywheelArn }}",
"ClientRequestToken": "{{ ClientRequestToken }}"
}'
;