Skip to main content

model_customization_jobs

Creates, updates, deletes, gets or lists a model_customization_jobs resource.

Overview

Namemodel_customization_jobs
TypeResource
Idaws.bedrock.model_customization_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
base_model_arnstringAmazon Resource Name (ARN) of the base model. (pattern: <code>arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}::foundation-model/[a-z0-9-]{1,63}[.]{1}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}</code>)
client_request_tokenstringThe token that you specified in the CreateCustomizationJob request. (pattern: <code>[a-zA-Z0-9]([-a-zA-Z0-9]{0,254}[a-zA-Z0-9])?</code>)
creation_timestring (date-time)Time that the resource was created.
customization_configobjectA model customization configuration
customization_typestringThe type of model customization. (FINE_TUNING, CONTINUED_PRE_TRAINING, DISTILLATION, REINFORCEMENT_FINE_TUNING, IMPORTED)
end_timestring (date-time)Time that the resource transitioned to terminal state.
failure_messagestringInformation about why the job failed.
hyper_parametersobjectThe hyperparameter values for the job. For details on the format for different models, see Custom model hyperparameters.
job_arnstringThe Amazon Resource Name (ARN) of the customization job. (pattern: <code>arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:model-customization-job/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}/[a-z0-9]{12}</code>)
job_namestringThe name of the customization job. (pattern: <code>[a-zA-Z0-9](-[a-zA-Z0-9+-.])</code>)
last_modified_timestring (date-time)Time that the resource was last modified.
output_data_configobjectS3 Location of the output data.
output_model_arnstringThe Amazon Resource Name (ARN) of the output model. (pattern: <code>arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:[a-z0-9-]{1,20}:[0-9]{12}:custom-model/(imported|[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2})/[a-z0-9]{12}</code>)
output_model_kms_key_arnstringThe custom model is encrypted at rest using this key. (pattern: <code>arn:aws(-[^:]+)?:kms:[a-zA-Z0-9-]*:[0-9]{12}:key/[a-zA-Z0-9-]{36}</code>)
output_model_namestringThe name of the output model. (pattern: <code>([0-9a-zA-Z][_-]?){1,63}</code>)
role_arnstringThe Amazon Resource Name (ARN) of the IAM role. (pattern: <code>arn:aws(-[^:]+)?:iam::([0-9]{12})?:role/.+</code>)
statusstringThe status of the job. A successful job transitions from in-progress to completed when the output model is ready to use. If the job failed, the failure message contains information about why the job failed. (InProgress, Completed, Failed, Stopping, Stopped)
status_detailsobjectFor a Distillation job, the details about the statuses of the sub-tasks of the customization job.
training_data_configobjectS3 Location of the training data.
training_metricsobjectContains training metrics from the job creation.
validation_data_configobjectArray of up to 10 validators.
validation_metricsarrayThe loss metric for each validator that you provided in the createjob request.
vpc_configobjectThe configuration of a virtual private cloud (VPC). For more information, see Protect your data using Amazon Virtual Private Cloud and Amazon Web Services PrivateLink.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_model_customization_jobselectjob_identifier, regionRetrieves the properties associated with a model-customization job, including the status of the job. For more information, see Custom models in the Amazon Bedrock User Guide.
list_model_customization_jobsselectregioncreationTimeAfter, creationTimeBefore, statusEquals, nameContains, maxResults, nextToken, sortBy, sortOrderReturns a list of model customization jobs that you have submitted. You can filter the jobs to return based on one or more criteria. For more information, see Custom models in the Amazon Bedrock User Guide.
create_model_customization_jobinsertregion, jobName, customModelName, roleArn, baseModelIdentifier, trainingDataConfig, outputDataConfigCreates a fine-tuning job to customize a base model. You specify the base foundation model and the location of the training data. After the model-customization job completes successfully, your custom model resource will be ready to use. Amazon Bedrock returns validation loss metrics and output generations after the job completes. For information on the format of training and validation data, see Prepare the datasets. Model-customization jobs are asynchronous and the completion time depends on the base model and the training/validation data size. To monitor a job, use the GetModelCustomizationJob operation to retrieve the job status. For more information, see Custom models in the Amazon Bedrock User Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
job_identifierstringIdentifier for the customization job.
regionstringAWS region (default: us-east-1)
creationTimeAfterstring (date-time)Return customization jobs created after the specified time.
creationTimeBeforestring (date-time)Return customization jobs created before the specified time.
maxResultsintegerThe maximum number of results to return in the response. If the total number of results is greater than this value, use the token returned in the response in the nextToken field when making another request to return the next batch of results.
nameContainsstringReturn customization jobs only if the job name contains these characters.
nextTokenstringIf the total number of results is greater than the maxResults value provided in the request, enter the token returned in the nextToken field in the response in this field to return the next batch of results.
sortBystringThe field to sort by in the returned list of jobs.
sortOrderstringThe sort order of the results.
statusEqualsstringReturn customization jobs with the specified status.

SELECT examples

Retrieves the properties associated with a model-customization job, including the status of the job. For more information, see Custom models in the Amazon Bedrock User Guide.

SELECT
base_model_arn,
client_request_token,
creation_time,
customization_config,
customization_type,
end_time,
failure_message,
hyper_parameters,
job_arn,
job_name,
last_modified_time,
output_data_config,
output_model_arn,
output_model_kms_key_arn,
output_model_name,
role_arn,
status,
status_details,
training_data_config,
training_metrics,
validation_data_config,
validation_metrics,
vpc_config
FROM aws.bedrock.model_customization_jobs
WHERE job_identifier = '{{ job_identifier }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a fine-tuning job to customize a base model. You specify the base foundation model and the location of the training data. After the model-customization job completes successfully, your custom model resource will be ready to use. Amazon Bedrock returns validation loss metrics and output generations after the job completes. For information on the format of training and validation data, see Prepare the datasets. Model-customization jobs are asynchronous and the completion time depends on the base model and the training/validation data size. To monitor a job, use the GetModelCustomizationJob operation to retrieve the job status. For more information, see Custom models in the Amazon Bedrock User Guide.

INSERT INTO aws.bedrock.model_customization_jobs (
jobName,
customModelName,
roleArn,
clientRequestToken,
baseModelIdentifier,
customizationType,
customModelKmsKeyId,
jobTags,
customModelTags,
trainingDataConfig,
validationDataConfig,
outputDataConfig,
hyperParameters,
vpcConfig,
customizationConfig,
region
)
SELECT
'{{ jobName }}' /* required */,
'{{ customModelName }}' /* required */,
'{{ roleArn }}' /* required */,
'{{ clientRequestToken }}',
'{{ baseModelIdentifier }}' /* required */,
'{{ customizationType }}',
'{{ customModelKmsKeyId }}',
'{{ jobTags }}',
'{{ customModelTags }}',
'{{ trainingDataConfig }}' /* required */,
'{{ validationDataConfig }}',
'{{ outputDataConfig }}' /* required */,
'{{ hyperParameters }}',
'{{ vpcConfig }}',
'{{ customizationConfig }}',
'{{ region }}'
RETURNING
job_arn
;