startTrainedModelInferenceJob method
- required ModelInferenceDataSource dataSource,
- required String membershipIdentifier,
- required String name,
- required InferenceOutputConfiguration outputConfiguration,
- required InferenceResourceConfig resourceConfig,
- required String trainedModelArn,
- String? configuredModelAlgorithmAssociationArn,
- InferenceContainerExecutionParameters? containerExecutionParameters,
- String? description,
- Map<
String, String> ? environment, - String? kmsKeyArn,
- String? mlModelInferencePayerAccountId,
- Map<
String, String> ? tags, - String? trainedModelVersionIdentifier,
Defines the information necessary to begin a trained model inference job.
May throw AccessDeniedException.
May throw ConflictException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter dataSource :
Defines the data source that is used for the trained model inference job.
Parameter membershipIdentifier :
The membership ID of the membership that contains the trained model
inference job.
Parameter name :
The name of the trained model inference job.
Parameter outputConfiguration :
Defines the output configuration information for the trained model
inference job.
Parameter resourceConfig :
Defines the resource configuration for the trained model inference job.
Parameter trainedModelArn :
The Amazon Resource Name (ARN) of the trained model that is used for this
trained model inference job.
Parameter configuredModelAlgorithmAssociationArn :
The Amazon Resource Name (ARN) of the configured model algorithm
association that is used for this trained model inference job.
Parameter containerExecutionParameters :
The execution parameters for the container.
Parameter description :
The description of the trained model inference job.
Parameter environment :
The environment variables to set in the Docker container.
Parameter kmsKeyArn :
The Amazon Resource Name (ARN) of the KMS key. This key is used to encrypt
and decrypt customer-owned data in the ML inference job and associated
data.
Parameter mlModelInferencePayerAccountId :
The account ID of the member that is responsible for paying for model
inference costs.
Parameter tags :
The optional metadata that you apply to the resource to help you
categorize and organize them. Each tag consists of a key and an optional
value, both of which you define.
The following basic restrictions apply to tags:
- Maximum number of tags per resource - 50.
- For each resource, each tag key must be unique, and each tag key can have only one value.
- Maximum key length - 128 Unicode characters in UTF-8.
- Maximum value length - 256 Unicode characters in UTF-8.
- If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
- Tag keys and values are case sensitive.
- Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for keys as it is reserved for AWS use. You cannot edit or delete tag keys with this prefix. Values can have this prefix. If a tag value has aws as its prefix but the key does not, then Clean Rooms ML considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of aws do not count against your tags per resource limit.
Parameter trainedModelVersionIdentifier :
The version identifier of the trained model to use for inference. This
specifies which version of the trained model should be used to generate
predictions on the input data.
Implementation
Future<StartTrainedModelInferenceJobResponse> startTrainedModelInferenceJob({
required ModelInferenceDataSource dataSource,
required String membershipIdentifier,
required String name,
required InferenceOutputConfiguration outputConfiguration,
required InferenceResourceConfig resourceConfig,
required String trainedModelArn,
String? configuredModelAlgorithmAssociationArn,
InferenceContainerExecutionParameters? containerExecutionParameters,
String? description,
Map<String, String>? environment,
String? kmsKeyArn,
String? mlModelInferencePayerAccountId,
Map<String, String>? tags,
String? trainedModelVersionIdentifier,
}) async {
final $payload = <String, dynamic>{
'dataSource': dataSource,
'name': name,
'outputConfiguration': outputConfiguration,
'resourceConfig': resourceConfig,
'trainedModelArn': trainedModelArn,
if (configuredModelAlgorithmAssociationArn != null)
'configuredModelAlgorithmAssociationArn':
configuredModelAlgorithmAssociationArn,
if (containerExecutionParameters != null)
'containerExecutionParameters': containerExecutionParameters,
if (description != null) 'description': description,
if (environment != null) 'environment': environment,
if (kmsKeyArn != null) 'kmsKeyArn': kmsKeyArn,
if (mlModelInferencePayerAccountId != null)
'mlModelInferencePayerAccountId': mlModelInferencePayerAccountId,
if (tags != null) 'tags': tags,
if (trainedModelVersionIdentifier != null)
'trainedModelVersionIdentifier': trainedModelVersionIdentifier,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/memberships/${Uri.encodeComponent(membershipIdentifier)}/trained-model-inference-jobs',
exceptionFnMap: _exceptionFns,
);
return StartTrainedModelInferenceJobResponse.fromJson(response);
}