create_flywheel
async
¶
create_flywheel(
flywheel_name: ComprehendArnName,
data_access_role_arn: IamRoleArn,
data_lake_s3_uri: FlywheelS3Uri,
*,
config_overrides: Optional[AsyncComprehendClientConfig] = 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/async_comprehend.py
1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 | |