Skip to content

Create Flywheel

comprehend_create_flywheel R Documentation

A flywheel is an Amazon Web Services resource that orchestrates the ongoing training of a model for custom classification or custom entity recognition

Description

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.

Usage

comprehend_create_flywheel(FlywheelName, ActiveModelArn,
  DataAccessRoleArn, TaskConfig, ModelType, DataLakeS3Uri,
  DataSecurityConfig, ClientRequestToken, Tags)

Arguments

FlywheelName

[required] Name for the flywheel.

ActiveModelArn

To associate an existing model with the flywheel, specify the Amazon Resource Number (ARN) of the model version. Do not set TaskConfig or ModelType if you specify an ActiveModelArn.

DataAccessRoleArn

[required] The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend the permissions required to access the flywheel data in the data lake.

TaskConfig

Configuration about the model associated with the flywheel. You need to set TaskConfig if you are creating a flywheel for a new model.

ModelType

The model type. You need to set ModelType if you are creating a flywheel for a new model.

DataLakeS3Uri

[required] Enter the S3 location for the data lake. You can specify a new S3 bucket or a new folder of an existing S3 bucket. The flywheel creates the data lake at this location.

DataSecurityConfig

Data security configurations.

ClientRequestToken

A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.

Tags

The tags to associate with this flywheel.

Value

A list with the following syntax:

list(
  FlywheelArn = "string",
  ActiveModelArn = "string"
)

Request syntax

svc$create_flywheel(
  FlywheelName = "string",
  ActiveModelArn = "string",
  DataAccessRoleArn = "string",
  TaskConfig = list(
    LanguageCode = "en"|"es"|"fr"|"de"|"it"|"pt"|"ar"|"hi"|"ja"|"ko"|"zh"|"zh-TW",
    DocumentClassificationConfig = list(
      Mode = "MULTI_CLASS"|"MULTI_LABEL",
      Labels = list(
        "string"
      )
    ),
    EntityRecognitionConfig = list(
      EntityTypes = list(
        list(
          Type = "string"
        )
      )
    )
  ),
  ModelType = "DOCUMENT_CLASSIFIER"|"ENTITY_RECOGNIZER",
  DataLakeS3Uri = "string",
  DataSecurityConfig = list(
    ModelKmsKeyId = "string",
    VolumeKmsKeyId = "string",
    DataLakeKmsKeyId = "string",
    VpcConfig = list(
      SecurityGroupIds = list(
        "string"
      ),
      Subnets = list(
        "string"
      )
    )
  ),
  ClientRequestToken = "string",
  Tags = list(
    list(
      Key = "string",
      Value = "string"
    )
  )
)