Create Model Customization Job
bedrock_create_model_customization_job | R Documentation |
Creates a fine-tuning job to customize a base model¶
Description¶
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 get_model_customization_job
operation to
retrieve the job status.
For more information, see Custom models in the Amazon Bedrock User Guide.
Usage¶
bedrock_create_model_customization_job(jobName, customModelName,
roleArn, clientRequestToken, baseModelIdentifier, customizationType,
customModelKmsKeyId, jobTags, customModelTags, trainingDataConfig,
validationDataConfig, outputDataConfig, hyperParameters, vpcConfig,
customizationConfig)
Arguments¶
jobName |
[required] A name for the fine-tuning job. |
customModelName |
[required] A name for the resulting custom model. |
roleArn |
[required] 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 |
clientRequestToken |
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. |
baseModelIdentifier |
[required] Name of the base model. |
customizationType |
The customization type. |
customModelKmsKeyId |
The custom model is encrypted at rest using this key. |
jobTags |
Tags to attach to the job. |
customModelTags |
Tags to attach to the resulting custom model. |
trainingDataConfig |
[required] Information about the training dataset. |
validationDataConfig |
Information about the validation dataset. |
outputDataConfig |
[required] S3 location for the output data. |
hyperParameters |
Parameters related to tuning the model. For details on the format for different models, see Custom model hyperparameters. |
vpcConfig |
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. |
customizationConfig |
The customization configuration for the model customization job. |
Value¶
A list with the following syntax:
list(
jobArn = "string"
)
Request syntax¶
svc$create_model_customization_job(
jobName = "string",
customModelName = "string",
roleArn = "string",
clientRequestToken = "string",
baseModelIdentifier = "string",
customizationType = "FINE_TUNING"|"CONTINUED_PRE_TRAINING"|"DISTILLATION",
customModelKmsKeyId = "string",
jobTags = list(
list(
key = "string",
value = "string"
)
),
customModelTags = list(
list(
key = "string",
value = "string"
)
),
trainingDataConfig = list(
s3Uri = "string",
invocationLogsConfig = list(
usePromptResponse = TRUE|FALSE,
invocationLogSource = list(
s3Uri = "string"
),
requestMetadataFilters = list(
equals = list(
"string"
),
notEquals = list(
"string"
),
andAll = list(
list(
equals = list(
"string"
),
notEquals = list(
"string"
)
)
),
orAll = list(
list(
equals = list(
"string"
),
notEquals = list(
"string"
)
)
)
)
)
),
validationDataConfig = list(
validators = list(
list(
s3Uri = "string"
)
)
),
outputDataConfig = list(
s3Uri = "string"
),
hyperParameters = list(
"string"
),
vpcConfig = list(
subnetIds = list(
"string"
),
securityGroupIds = list(
"string"
)
),
customizationConfig = list(
distillationConfig = list(
teacherModelConfig = list(
teacherModelIdentifier = "string",
maxResponseLengthForInference = 123
)
)
)
)