create_flywheel
¶
create_flywheel(
flywheel_name: ComprehendArnName,
data_access_role_arn: IamRoleArn,
data_lake_s3_uri: FlywheelS3Uri,
*,
config_overrides: Optional[ComprehendClientConfig] = None,
active_model_arn: Optional[ComprehendModelArn] = None,
task_config: Optional[TaskConfig] = None,
model_type: Optional[ModelType] = None,
data_security_config: Optional[DataSecurityConfig] = None,
client_request_token: Optional[ClientRequestTokenString] = None,
tags: Optional[TagList] = None,
) -> CreateFlywheelResponse
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.
Parameters:
-
flywheel_name(ComprehendArnName) –Name for the flywheel.
-
active_model_arn(Optional[ComprehendModelArn], default:None) –To associate an existing model with the flywheel, specify the Amazon Resource Number (ARN) of the model version. Do not set
TaskConfigorModelTypeif you specify anActiveModelArn. -
data_access_role_arn(IamRoleArn) –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.
-
task_config(Optional[TaskConfig], default:None) –Configuration about the model associated with the flywheel. You need to set
TaskConfigif you are creating a flywheel for a new model. -
model_type(Optional[ModelType], default:None) –The model type. You need to set
ModelTypeif you are creating a flywheel for a new model. -
data_lake_s3_uri(FlywheelS3Uri) –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.
-
data_security_config(Optional[DataSecurityConfig], default:None) –Data security configurations.
-
client_request_token(Optional[ClientRequestTokenString], default:None) –A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
-
tags(Optional[TagList], default:None) –The tags to associate with this flywheel.
Raises:
-
InternalServerException–An internal server error occurred. Retry your request.
-
InvalidRequestException–The request is invalid.
-
KmsKeyValidationException–The KMS customer managed key (CMK) entered cannot be validated. Verify the key and re-enter it.
-
ResourceInUseException–The specified resource name is already in use. Use a different name and try your request again.
-
ResourceLimitExceededException–The maximum number of resources per account has been exceeded. Review the resources, and then try your request again.
-
ResourceNotFoundException–The specified resource ARN was not found. Check the ARN and try your request again.
-
ResourceUnavailableException–The specified resource is not available. Check the resource and try your request again.
-
TooManyRequestsException–The number of requests exceeds the limit. Resubmit your request later.
-
TooManyTagsException–The request contains more tags than can be associated with a resource (50 tags per resource). The maximum number of tags includes both existing tags and those included in your current request.
-
UnsupportedLanguageException–Amazon Comprehend can't process the language of the input text. For a list of supported languages, Supported languages in the Comprehend Developer Guide.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_comprehend/_services/comprehend.py
1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 | |