Skip to content

BedrockClient.create_model_customization_job

rboto-bedrock==0.4.0 · Service index · Types

Model summary (excerpt): 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,...

Install and imports

python -m pip install "rboto[bedrock]==0.4.0"
from rboto import BedrockClient
from collections.abc import Sequence
from rboto_bedrock.types import (
    CreateModelCustomizationJobOutput,
    CustomizationConfig,
    CustomizationType,
    OutputDataConfig,
    Tag,
    TrainingDataConfig,
    ValidationDataConfig,
    VpcConfig,
)

Signature

async def create_model_customization_job(
    *,
    job_name: str,
    custom_model_name: str,
    role_arn: str,
    base_model_identifier: str,
    training_data_config: TrainingDataConfig,
    output_data_config: OutputDataConfig,
    client_request_token: str | None = None,
    customization_type: CustomizationType | None = None,
    custom_model_kms_key_id: str | None = None,
    job_tags: Sequence[Tag] | None = None,
    custom_model_tags: Sequence[Tag] | None = None,
    validation_data_config: ValidationDataConfig | None = None,
    hyper_parameters: dict[str, str] | None = None,
    vpc_config: VpcConfig | None = None,
    customization_config: CustomizationConfig | None = None,
) -> CreateModelCustomizationJobOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
job_name Yes A name for the fine-tuning job.
custom_model_name Yes A name for the resulting custom model.
role_arn Yes 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.
base_model_identifier Yes Name of the base model.
training_data_config Yes Information about the training dataset.
output_data_config Yes S3 location for the output data.
client_request_token No 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 .
customization_type No The customization type.
custom_model_kms_key_id No The custom model is encrypted at rest using this key.
job_tags No Tags to attach to the job.
custom_model_tags No Tags to attach to the resulting custom model.
validation_data_config No Information about the validation dataset.
hyper_parameters No Parameters related to tuning the model. For details on the format for different models, see Custom model hyperparameters .
vpc_config No 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 .
customization_config No The customization configuration for the model customization job.

Output

CreateModelCustomizationJobOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
job_arn str Always present —

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

CreateModelCustomizationJobOutput, CustomizationConfig, CustomizationType, OutputDataConfig, Tag, TrainingDataConfig, ValidationDataConfig, VpcConfig

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_bedrock.exceptions:

AccessDeniedError, ConflictError, InternalServerError, ResourceNotFoundError, ServiceQuotaExceededError, ThrottlingError, TooManyTagsError, ValidationError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model