Using flywheels for analysis - Amazon Comprehend

Using flywheels for analysis

You can use the flywheel's active model version to run analysis for custom classification or entity recognition. The active model version is configurable. You can use the console or the UpdateFlywheel API operation to set a new version of the model to be the active model version.

To use the flywheel, specify the flywheel ARN instead of a custom model ARN when you configure the analysis task. Amazon Comprehend runs the analysis using the flywheel's active model version.

Real-time analysis

You use an endpoint to run real-time analysis. When you create or update an endpoint, you can configure it with the flywheel ARN instead of a model ARN. When you run the real-time analysis, select the endpoint associated with the flywheel. Amazon Comprehend runs the analysis using the active model version of the flywheel.

When you use UpdateFlywheel to set a new active model version for the flywheel, the endpoint updates automatically to start using the new active model version. If you don't want the endpoint to update automatically, configure the endpoint (using UpdateEndpoint) to use the model version ARN directly. The endpoint continues to use this model version if the flywheel active model version changes.

For custom classification, use the ClassifyDocument API operation. For custom entity recognition, use the DetectEntities API request. Provide the endpoint of the flywheel in the EndpointArn parameter.

You can also use the console to run real-time analysis for custom classification or custom entity recognition.

Asynchronous jobs

For custom classification, use the StartDocumentClassificationJob API request to start an aysnchronous job. Provide the FlywheelArn parameter instead of the DocumentClassifierArn.

For custom entity recognition, use the StartEntitiesDetectionJob API request. Provide the FlywheelArn parameter instead of the EntityRecognizerArn.

You can use the console to run asynchronous analysis jobs for custom classification or custom entity recognition. When you create the job, enter the flywheel ARN in the Recognizer model or Classifier model field.