Skip to content

/AWS1/CL_BDK=>CREATEMODELCUSTOMIZATIONJOB()

About CreateModelCustomizationJob

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.

Method Signature

IMPORTING

Required arguments:

IV_JOBNAME TYPE /AWS1/BDKJOBNAME /AWS1/BDKJOBNAME

A name for the fine-tuning job.

IV_CUSTOMMODELNAME TYPE /AWS1/BDKCUSTOMMODELNAME /AWS1/BDKCUSTOMMODELNAME

A name for the resulting custom model.

IV_ROLEARN TYPE /AWS1/BDKROLEARN /AWS1/BDKROLEARN

The Amazon Resource Name (ARN) of an IAM service role that Amazon Bedrock can assume to perform tasks on your behalf. For example, during model training, Amazon Bedrock needs your permission to read input data from an S3 bucket, write model artifacts to an S3 bucket. To pass this role to Amazon Bedrock, the caller of this API must have the iam:PassRole permission.

IV_BASEMODELIDENTIFIER TYPE /AWS1/BDKBASEMODELIDENTIFIER /AWS1/BDKBASEMODELIDENTIFIER

Name of the base model.

IO_TRAININGDATACONFIG TYPE REF TO /AWS1/CL_BDKTRAININGDATACONFIG /AWS1/CL_BDKTRAININGDATACONFIG

Information about the training dataset.

IO_OUTPUTDATACONFIG TYPE REF TO /AWS1/CL_BDKOUTPUTDATACONFIG /AWS1/CL_BDKOUTPUTDATACONFIG

S3 location for the output data.

IT_HYPERPARAMETERS TYPE /AWS1/CL_BDKMDELCUSTIZATIONH00=>TT_MODELCUSTIZATIONHYPERPARAMS TT_MODELCUSTIZATIONHYPERPARAMS

Parameters related to tuning the model. For details on the format for different models, see Custom model hyperparameters.

Optional arguments:

IV_CLIENTREQUESTTOKEN TYPE /AWS1/BDKIDEMPOTENCYTOKEN /AWS1/BDKIDEMPOTENCYTOKEN

A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.

IV_CUSTOMIZATIONTYPE TYPE /AWS1/BDKCUSTOMIZATIONTYPE /AWS1/BDKCUSTOMIZATIONTYPE

The customization type.

IV_CUSTOMMODELKMSKEYID TYPE /AWS1/BDKKMSKEYID /AWS1/BDKKMSKEYID

The custom model is encrypted at rest using this key.

IT_JOBTAGS TYPE /AWS1/CL_BDKTAG=>TT_TAGLIST TT_TAGLIST

Tags to attach to the job.

IT_CUSTOMMODELTAGS TYPE /AWS1/CL_BDKTAG=>TT_TAGLIST TT_TAGLIST

Tags to attach to the resulting custom model.

IO_VALIDATIONDATACONFIG TYPE REF TO /AWS1/CL_BDKVALIDATIONDATACFG /AWS1/CL_BDKVALIDATIONDATACFG

Information about the validation dataset.

IO_VPCCONFIG TYPE REF TO /AWS1/CL_BDKVPCCONFIG /AWS1/CL_BDKVPCCONFIG

The configuration of the Virtual Private Cloud (VPC) that contains the resources that you're using for this job. For more information, see Protect your model customization jobs using a VPC.

RETURNING

OO_OUTPUT TYPE REF TO /AWS1/CL_BDKCREMDELCUSTIZATI01 /AWS1/CL_BDKCREMDELCUSTIZATI01