2024/12/03 - Amazon Bedrock - 9 updated api methods
Changes Tagging support for Async Invoke resources. Added support for Distillation in CreateModelCustomizationJob API. Support for videoDataDeliveryEnabled flag in invocation logging.
{'customizationConfig': {'distillationConfig': {'teacherModelConfig': {'maxResponseLengthForInference': 'integer', 'teacherModelIdentifier': 'string'}}}, 'customizationType': {'DISTILLATION'}, 'trainingDataConfig': {'invocationLogsConfig': {'invocationLogSource': {'s3Uri': 'string'}, 'requestMetadataFilters': {'andAll': [{'equals': {'string': 'string'}, 'notEquals': {'string': 'string'}}], 'equals': {'string': 'string'}, 'notEquals': {'string': 'string'}, 'orAll': [{'equals': {'string': 'string'}, 'notEquals': {'string': 'string'}}]}, 'usePromptResponse': 'boolean'}}}
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.
See also: AWS API Documentation
Request Syntax
client.create_model_customization_job( jobName='string', customModelName='string', roleArn='string', clientRequestToken='string', baseModelIdentifier='string', customizationType='FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION', customModelKmsKeyId='string', jobTags=[ { 'key': 'string', 'value': 'string' }, ], customModelTags=[ { 'key': 'string', 'value': 'string' }, ], trainingDataConfig={ 's3Uri': 'string', 'invocationLogsConfig': { 'usePromptResponse': True|False, 'invocationLogSource': { 's3Uri': 'string' }, 'requestMetadataFilters': { 'equals': { 'string': 'string' }, 'notEquals': { 'string': 'string' }, 'andAll': [ { 'equals': { 'string': 'string' }, 'notEquals': { 'string': 'string' } }, ], 'orAll': [ { 'equals': { 'string': 'string' }, 'notEquals': { 'string': 'string' } }, ] } } }, validationDataConfig={ 'validators': [ { 's3Uri': 'string' }, ] }, outputDataConfig={ 's3Uri': 'string' }, hyperParameters={ 'string': 'string' }, vpcConfig={ 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] }, customizationConfig={ 'distillationConfig': { 'teacherModelConfig': { 'teacherModelIdentifier': 'string', 'maxResponseLengthForInference': 123 } } } )
string
[REQUIRED]
A name for the fine-tuning job.
string
[REQUIRED]
A name for the resulting custom model.
string
[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 iam:PassRole permission.
string
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.
This field is autopopulated if not provided.
string
[REQUIRED]
Name of the base model.
string
The customization type.
string
The custom model is encrypted at rest using this key.
list
Tags to attach to the job.
(dict) --
Definition of the key/value pair for a tag.
key (string) -- [REQUIRED]
Key for the tag.
value (string) -- [REQUIRED]
Value for the tag.
list
Tags to attach to the resulting custom model.
(dict) --
Definition of the key/value pair for a tag.
key (string) -- [REQUIRED]
Key for the tag.
value (string) -- [REQUIRED]
Value for the tag.
dict
[REQUIRED]
Information about the training dataset.
s3Uri (string) --
The S3 URI where the training data is stored.
invocationLogsConfig (dict) --
Settings for using invocation logs to customize a model.
usePromptResponse (boolean) --
Whether to use the model's response for training, or just the prompt. The default value is False.
invocationLogSource (dict) -- [REQUIRED]
The source of the invocation logs.
s3Uri (string) --
The URI of an invocation log in a bucket.
requestMetadataFilters (dict) --
Rules for filtering invocation logs based on request metadata.
equals (dict) --
Include results where the key equals the value.
(string) --
(string) --
notEquals (dict) --
Include results where the key does not equal the value.
(string) --
(string) --
andAll (list) --
Include results where all of the based filters match.
(dict) --
A mapping of a metadata key to a value that it should or should not equal.
equals (dict) --
Include results where the key equals the value.
(string) --
(string) --
notEquals (dict) --
Include results where the key does not equal the value.
(string) --
(string) --
orAll (list) --
Include results where any of the base filters match.
(dict) --
A mapping of a metadata key to a value that it should or should not equal.
equals (dict) --
Include results where the key equals the value.
(string) --
(string) --
notEquals (dict) --
Include results where the key does not equal the value.
(string) --
(string) --
dict
Information about the validation dataset.
validators (list) -- [REQUIRED]
Information about the validators.
(dict) --
Information about a validator.
s3Uri (string) -- [REQUIRED]
The S3 URI where the validation data is stored.
dict
[REQUIRED]
S3 location for the output data.
s3Uri (string) -- [REQUIRED]
The S3 URI where the output data is stored.
dict
Parameters related to tuning the model. For details on the format for different models, see Custom model hyperparameters.
(string) --
(string) --
dict
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.
subnetIds (list) -- [REQUIRED]
An array of IDs for each subnet in the VPC to use.
(string) --
securityGroupIds (list) -- [REQUIRED]
An array of IDs for each security group in the VPC to use.
(string) --
dict
The customization configuration for the model customization job.
distillationConfig (dict) --
The distillation configuration for the custom model.
teacherModelConfig (dict) -- [REQUIRED]
The teacher model configuration.
teacherModelIdentifier (string) -- [REQUIRED]
The identifier of the teacher model.
maxResponseLengthForInference (integer) --
The maximum number of tokens requested when the customization job invokes the teacher model.
dict
Response Syntax
{ 'jobArn': 'string' }
Response Structure
(dict) --
jobArn (string) --
Amazon Resource Name (ARN) of the fine tuning job
{'customizationConfig': {'distillationConfig': {'teacherModelConfig': {'maxResponseLengthForInference': 'integer', 'teacherModelIdentifier': 'string'}}}, 'customizationType': {'DISTILLATION'}, 'trainingDataConfig': {'invocationLogsConfig': {'invocationLogSource': {'s3Uri': 'string'}, 'requestMetadataFilters': {'andAll': [{'equals': {'string': 'string'}, 'notEquals': {'string': 'string'}}], 'equals': {'string': 'string'}, 'notEquals': {'string': 'string'}, 'orAll': [{'equals': {'string': 'string'}, 'notEquals': {'string': 'string'}}]}, 'usePromptResponse': 'boolean'}}}
Get the properties associated with a Amazon Bedrock custom model that you have created.For more information, see Custom models in the Amazon Bedrock User Guide.
See also: AWS API Documentation
Request Syntax
client.get_custom_model( modelIdentifier='string' )
string
[REQUIRED]
Name or Amazon Resource Name (ARN) of the custom model.
dict
Response Syntax
{ 'modelArn': 'string', 'modelName': 'string', 'jobName': 'string', 'jobArn': 'string', 'baseModelArn': 'string', 'customizationType': 'FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION', 'modelKmsKeyArn': 'string', 'hyperParameters': { 'string': 'string' }, 'trainingDataConfig': { 's3Uri': 'string', 'invocationLogsConfig': { 'usePromptResponse': True|False, 'invocationLogSource': { 's3Uri': 'string' }, 'requestMetadataFilters': { 'equals': { 'string': 'string' }, 'notEquals': { 'string': 'string' }, 'andAll': [ { 'equals': { 'string': 'string' }, 'notEquals': { 'string': 'string' } }, ], 'orAll': [ { 'equals': { 'string': 'string' }, 'notEquals': { 'string': 'string' } }, ] } } }, 'validationDataConfig': { 'validators': [ { 's3Uri': 'string' }, ] }, 'outputDataConfig': { 's3Uri': 'string' }, 'trainingMetrics': { 'trainingLoss': ... }, 'validationMetrics': [ { 'validationLoss': ... }, ], 'creationTime': datetime(2015, 1, 1), 'customizationConfig': { 'distillationConfig': { 'teacherModelConfig': { 'teacherModelIdentifier': 'string', 'maxResponseLengthForInference': 123 } } } }
Response Structure
(dict) --
modelArn (string) --
Amazon Resource Name (ARN) associated with this model.
modelName (string) --
Model name associated with this model.
jobName (string) --
Job name associated with this model.
jobArn (string) --
Job Amazon Resource Name (ARN) associated with this model.
baseModelArn (string) --
Amazon Resource Name (ARN) of the base model.
customizationType (string) --
The type of model customization.
modelKmsKeyArn (string) --
The custom model is encrypted at rest using this key.
hyperParameters (dict) --
Hyperparameter values associated with this model. For details on the format for different models, see Custom model hyperparameters.
(string) --
(string) --
trainingDataConfig (dict) --
Contains information about the training dataset.
s3Uri (string) --
The S3 URI where the training data is stored.
invocationLogsConfig (dict) --
Settings for using invocation logs to customize a model.
usePromptResponse (boolean) --
Whether to use the model's response for training, or just the prompt. The default value is False.
invocationLogSource (dict) --
The source of the invocation logs.
s3Uri (string) --
The URI of an invocation log in a bucket.
requestMetadataFilters (dict) --
Rules for filtering invocation logs based on request metadata.
equals (dict) --
Include results where the key equals the value.
(string) --
(string) --
notEquals (dict) --
Include results where the key does not equal the value.
(string) --
(string) --
andAll (list) --
Include results where all of the based filters match.
(dict) --
A mapping of a metadata key to a value that it should or should not equal.
equals (dict) --
Include results where the key equals the value.
(string) --
(string) --
notEquals (dict) --
Include results where the key does not equal the value.
(string) --
(string) --
orAll (list) --
Include results where any of the base filters match.
(dict) --
A mapping of a metadata key to a value that it should or should not equal.
equals (dict) --
Include results where the key equals the value.
(string) --
(string) --
notEquals (dict) --
Include results where the key does not equal the value.
(string) --
(string) --
validationDataConfig (dict) --
Contains information about the validation dataset.
validators (list) --
Information about the validators.
(dict) --
Information about a validator.
s3Uri (string) --
The S3 URI where the validation data is stored.
outputDataConfig (dict) --
Output data configuration associated with this custom model.
s3Uri (string) --
The S3 URI where the output data is stored.
trainingMetrics (dict) --
Contains training metrics from the job creation.
trainingLoss (float) --
Loss metric associated with the custom job.
validationMetrics (list) --
The validation metrics from the job creation.
(dict) --
The metric for the validator.
validationLoss (float) --
The validation loss associated with this validator.
creationTime (datetime) --
Creation time of the model.
customizationConfig (dict) --
The customization configuration for the custom model.
distillationConfig (dict) --
The distillation configuration for the custom model.
teacherModelConfig (dict) --
The teacher model configuration.
teacherModelIdentifier (string) --
The identifier of the teacher model.
maxResponseLengthForInference (integer) --
The maximum number of tokens requested when the customization job invokes the teacher model.
{'modelDetails': {'customizationsSupported': {'DISTILLATION'}}}
Get details about a Amazon Bedrock foundation model.
See also: AWS API Documentation
Request Syntax
client.get_foundation_model( modelIdentifier='string' )
string
[REQUIRED]
The model identifier.
dict
Response Syntax
{ 'modelDetails': { 'modelArn': 'string', 'modelId': 'string', 'modelName': 'string', 'providerName': 'string', 'inputModalities': [ 'TEXT'|'IMAGE'|'EMBEDDING', ], 'outputModalities': [ 'TEXT'|'IMAGE'|'EMBEDDING', ], 'responseStreamingSupported': True|False, 'customizationsSupported': [ 'FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION', ], 'inferenceTypesSupported': [ 'ON_DEMAND'|'PROVISIONED', ], 'modelLifecycle': { 'status': 'ACTIVE'|'LEGACY' } } }
Response Structure
(dict) --
modelDetails (dict) --
Information about the foundation model.
modelArn (string) --
The model Amazon Resource Name (ARN).
modelId (string) --
The model identifier.
modelName (string) --
The model name.
providerName (string) --
The model's provider name.
inputModalities (list) --
The input modalities that the model supports.
(string) --
outputModalities (list) --
The output modalities that the model supports.
(string) --
responseStreamingSupported (boolean) --
Indicates whether the model supports streaming.
customizationsSupported (list) --
The customization that the model supports.
(string) --
inferenceTypesSupported (list) --
The inference types that the model supports.
(string) --
modelLifecycle (dict) --
Contains details about whether a model version is available or deprecated
status (string) --
Specifies whether a model version is available ( ACTIVE) or deprecated ( LEGACY.
{'customizationConfig': {'distillationConfig': {'teacherModelConfig': {'maxResponseLengthForInference': 'integer', 'teacherModelIdentifier': 'string'}}}, 'customizationType': {'DISTILLATION'}, 'trainingDataConfig': {'invocationLogsConfig': {'invocationLogSource': {'s3Uri': 'string'}, 'requestMetadataFilters': {'andAll': [{'equals': {'string': 'string'}, 'notEquals': {'string': 'string'}}], 'equals': {'string': 'string'}, 'notEquals': {'string': 'string'}, 'orAll': [{'equals': {'string': 'string'}, 'notEquals': {'string': 'string'}}]}, 'usePromptResponse': 'boolean'}}}
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.
See also: AWS API Documentation
Request Syntax
client.get_model_customization_job( jobIdentifier='string' )
string
[REQUIRED]
Identifier for the customization job.
dict
Response Syntax
{ 'jobArn': 'string', 'jobName': 'string', 'outputModelName': 'string', 'outputModelArn': 'string', 'clientRequestToken': 'string', 'roleArn': 'string', 'status': 'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped', 'failureMessage': 'string', 'creationTime': datetime(2015, 1, 1), 'lastModifiedTime': datetime(2015, 1, 1), 'endTime': datetime(2015, 1, 1), 'baseModelArn': 'string', 'hyperParameters': { 'string': 'string' }, 'trainingDataConfig': { 's3Uri': 'string', 'invocationLogsConfig': { 'usePromptResponse': True|False, 'invocationLogSource': { 's3Uri': 'string' }, 'requestMetadataFilters': { 'equals': { 'string': 'string' }, 'notEquals': { 'string': 'string' }, 'andAll': [ { 'equals': { 'string': 'string' }, 'notEquals': { 'string': 'string' } }, ], 'orAll': [ { 'equals': { 'string': 'string' }, 'notEquals': { 'string': 'string' } }, ] } } }, 'validationDataConfig': { 'validators': [ { 's3Uri': 'string' }, ] }, 'outputDataConfig': { 's3Uri': 'string' }, 'customizationType': 'FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION', 'outputModelKmsKeyArn': 'string', 'trainingMetrics': { 'trainingLoss': ... }, 'validationMetrics': [ { 'validationLoss': ... }, ], 'vpcConfig': { 'subnetIds': [ 'string', ], 'securityGroupIds': [ 'string', ] }, 'customizationConfig': { 'distillationConfig': { 'teacherModelConfig': { 'teacherModelIdentifier': 'string', 'maxResponseLengthForInference': 123 } } } }
Response Structure
(dict) --
jobArn (string) --
The Amazon Resource Name (ARN) of the customization job.
jobName (string) --
The name of the customization job.
outputModelName (string) --
The name of the output model.
outputModelArn (string) --
The Amazon Resource Name (ARN) of the output model.
clientRequestToken (string) --
The token that you specified in the CreateCustomizationJob request.
roleArn (string) --
The Amazon Resource Name (ARN) of the IAM role.
status (string) --
The 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.
failureMessage (string) --
Information about why the job failed.
creationTime (datetime) --
Time that the resource was created.
lastModifiedTime (datetime) --
Time that the resource was last modified.
endTime (datetime) --
Time that the resource transitioned to terminal state.
baseModelArn (string) --
Amazon Resource Name (ARN) of the base model.
hyperParameters (dict) --
The hyperparameter values for the job. For details on the format for different models, see Custom model hyperparameters.
(string) --
(string) --
trainingDataConfig (dict) --
Contains information about the training dataset.
s3Uri (string) --
The S3 URI where the training data is stored.
invocationLogsConfig (dict) --
Settings for using invocation logs to customize a model.
usePromptResponse (boolean) --
Whether to use the model's response for training, or just the prompt. The default value is False.
invocationLogSource (dict) --
The source of the invocation logs.
s3Uri (string) --
The URI of an invocation log in a bucket.
requestMetadataFilters (dict) --
Rules for filtering invocation logs based on request metadata.
equals (dict) --
Include results where the key equals the value.
(string) --
(string) --
notEquals (dict) --
Include results where the key does not equal the value.
(string) --
(string) --
andAll (list) --
Include results where all of the based filters match.
(dict) --
A mapping of a metadata key to a value that it should or should not equal.
equals (dict) --
Include results where the key equals the value.
(string) --
(string) --
notEquals (dict) --
Include results where the key does not equal the value.
(string) --
(string) --
orAll (list) --
Include results where any of the base filters match.
(dict) --
A mapping of a metadata key to a value that it should or should not equal.
equals (dict) --
Include results where the key equals the value.
(string) --
(string) --
notEquals (dict) --
Include results where the key does not equal the value.
(string) --
(string) --
validationDataConfig (dict) --
Contains information about the validation dataset.
validators (list) --
Information about the validators.
(dict) --
Information about a validator.
s3Uri (string) --
The S3 URI where the validation data is stored.
outputDataConfig (dict) --
Output data configuration
s3Uri (string) --
The S3 URI where the output data is stored.
customizationType (string) --
The type of model customization.
outputModelKmsKeyArn (string) --
The custom model is encrypted at rest using this key.
trainingMetrics (dict) --
Contains training metrics from the job creation.
trainingLoss (float) --
Loss metric associated with the custom job.
validationMetrics (list) --
The loss metric for each validator that you provided in the createjob request.
(dict) --
The metric for the validator.
validationLoss (float) --
The validation loss associated with this validator.
vpcConfig (dict) --
VPC configuration for the custom model job.
subnetIds (list) --
An array of IDs for each subnet in the VPC to use.
(string) --
securityGroupIds (list) --
An array of IDs for each security group in the VPC to use.
(string) --
customizationConfig (dict) --
The customization configuration for the model customization job.
distillationConfig (dict) --
The distillation configuration for the custom model.
teacherModelConfig (dict) --
The teacher model configuration.
teacherModelIdentifier (string) --
The identifier of the teacher model.
maxResponseLengthForInference (integer) --
The maximum number of tokens requested when the customization job invokes the teacher model.
{'loggingConfig': {'videoDataDeliveryEnabled': 'boolean'}}
Get the current configuration values for model invocation logging.
See also: AWS API Documentation
Request Syntax
client.get_model_invocation_logging_configuration()
dict
Response Syntax
{ 'loggingConfig': { 'cloudWatchConfig': { 'logGroupName': 'string', 'roleArn': 'string', 'largeDataDeliveryS3Config': { 'bucketName': 'string', 'keyPrefix': 'string' } }, 's3Config': { 'bucketName': 'string', 'keyPrefix': 'string' }, 'textDataDeliveryEnabled': True|False, 'imageDataDeliveryEnabled': True|False, 'embeddingDataDeliveryEnabled': True|False, 'videoDataDeliveryEnabled': True|False } }
Response Structure
(dict) --
loggingConfig (dict) --
The current configuration values.
cloudWatchConfig (dict) --
CloudWatch logging configuration.
logGroupName (string) --
The log group name.
roleArn (string) --
The role Amazon Resource Name (ARN).
largeDataDeliveryS3Config (dict) --
S3 configuration for delivering a large amount of data.
bucketName (string) --
S3 bucket name.
keyPrefix (string) --
S3 prefix.
s3Config (dict) --
S3 configuration for storing log data.
bucketName (string) --
S3 bucket name.
keyPrefix (string) --
S3 prefix.
textDataDeliveryEnabled (boolean) --
Set to include text data in the log delivery.
imageDataDeliveryEnabled (boolean) --
Set to include image data in the log delivery.
embeddingDataDeliveryEnabled (boolean) --
Set to include embeddings data in the log delivery.
videoDataDeliveryEnabled (boolean) --
Set to include video data in the log delivery.
{'modelSummaries': {'customizationType': {'DISTILLATION'}}}
Returns a list of the custom models that you have created with the CreateModelCustomizationJob operation.
For more information, see Custom models in the Amazon Bedrock User Guide.
See also: AWS API Documentation
Request Syntax
client.list_custom_models( creationTimeBefore=datetime(2015, 1, 1), creationTimeAfter=datetime(2015, 1, 1), nameContains='string', baseModelArnEquals='string', foundationModelArnEquals='string', maxResults=123, nextToken='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending', isOwned=True|False )
datetime
Return custom models created before the specified time.
datetime
Return custom models created after the specified time.
string
Return custom models only if the job name contains these characters.
string
Return custom models only if the base model Amazon Resource Name (ARN) matches this parameter.
string
Return custom models only if the foundation model Amazon Resource Name (ARN) matches this parameter.
integer
The 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.
string
If 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.
string
The field to sort by in the returned list of models.
string
The sort order of the results.
boolean
Return custom models depending on if the current account owns them ( true) or if they were shared with the current account ( false).
dict
Response Syntax
{ 'nextToken': 'string', 'modelSummaries': [ { 'modelArn': 'string', 'modelName': 'string', 'creationTime': datetime(2015, 1, 1), 'baseModelArn': 'string', 'baseModelName': 'string', 'customizationType': 'FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION', 'ownerAccountId': 'string' }, ] }
Response Structure
(dict) --
nextToken (string) --
If the total number of results is greater than the maxResults value provided in the request, use this token when making another request in the nextToken field to return the next batch of results.
modelSummaries (list) --
Model summaries.
(dict) --
Summary information for a custom model.
modelArn (string) --
The Amazon Resource Name (ARN) of the custom model.
modelName (string) --
The name of the custom model.
creationTime (datetime) --
Creation time of the model.
baseModelArn (string) --
The base model Amazon Resource Name (ARN).
baseModelName (string) --
The base model name.
customizationType (string) --
Specifies whether to carry out continued pre-training of a model or whether to fine-tune it. For more information, see Custom models.
ownerAccountId (string) --
The unique identifier of the account that owns the model.
{'byCustomizationType': {'DISTILLATION'}}Response
{'modelSummaries': {'customizationsSupported': {'DISTILLATION'}}}
Lists Amazon Bedrock foundation models that you can use. You can filter the results with the request parameters. For more information, see Foundation models in the Amazon Bedrock User Guide.
See also: AWS API Documentation
Request Syntax
client.list_foundation_models( byProvider='string', byCustomizationType='FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION', byOutputModality='TEXT'|'IMAGE'|'EMBEDDING', byInferenceType='ON_DEMAND'|'PROVISIONED' )
string
Return models belonging to the model provider that you specify.
string
Return models that support the customization type that you specify. For more information, see Custom models in the Amazon Bedrock User Guide.
string
Return models that support the output modality that you specify.
string
Return models that support the inference type that you specify. For more information, see Provisioned Throughput in the Amazon Bedrock User Guide.
dict
Response Syntax
{ 'modelSummaries': [ { 'modelArn': 'string', 'modelId': 'string', 'modelName': 'string', 'providerName': 'string', 'inputModalities': [ 'TEXT'|'IMAGE'|'EMBEDDING', ], 'outputModalities': [ 'TEXT'|'IMAGE'|'EMBEDDING', ], 'responseStreamingSupported': True|False, 'customizationsSupported': [ 'FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION', ], 'inferenceTypesSupported': [ 'ON_DEMAND'|'PROVISIONED', ], 'modelLifecycle': { 'status': 'ACTIVE'|'LEGACY' } }, ] }
Response Structure
(dict) --
modelSummaries (list) --
A list of Amazon Bedrock foundation models.
(dict) --
Summary information for a foundation model.
modelArn (string) --
The Amazon Resource Name (ARN) of the foundation model.
modelId (string) --
The model ID of the foundation model.
modelName (string) --
The name of the model.
providerName (string) --
The model's provider name.
inputModalities (list) --
The input modalities that the model supports.
(string) --
outputModalities (list) --
The output modalities that the model supports.
(string) --
responseStreamingSupported (boolean) --
Indicates whether the model supports streaming.
customizationsSupported (list) --
Whether the model supports fine-tuning or continual pre-training.
(string) --
inferenceTypesSupported (list) --
The inference types that the model supports.
(string) --
modelLifecycle (dict) --
Contains details about whether a model version is available or deprecated.
status (string) --
Specifies whether a model version is available ( ACTIVE) or deprecated ( LEGACY.
{'modelCustomizationJobSummaries': {'customizationType': {'DISTILLATION'}}}
Returns 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.
See also: AWS API Documentation
Request Syntax
client.list_model_customization_jobs( creationTimeAfter=datetime(2015, 1, 1), creationTimeBefore=datetime(2015, 1, 1), statusEquals='InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped', nameContains='string', maxResults=123, nextToken='string', sortBy='CreationTime', sortOrder='Ascending'|'Descending' )
datetime
Return customization jobs created after the specified time.
datetime
Return customization jobs created before the specified time.
string
Return customization jobs with the specified status.
string
Return customization jobs only if the job name contains these characters.
integer
The 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.
string
If 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.
string
The field to sort by in the returned list of jobs.
string
The sort order of the results.
dict
Response Syntax
{ 'nextToken': 'string', 'modelCustomizationJobSummaries': [ { 'jobArn': 'string', 'baseModelArn': 'string', 'jobName': 'string', 'status': 'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped', 'lastModifiedTime': datetime(2015, 1, 1), 'creationTime': datetime(2015, 1, 1), 'endTime': datetime(2015, 1, 1), 'customModelArn': 'string', 'customModelName': 'string', 'customizationType': 'FINE_TUNING'|'CONTINUED_PRE_TRAINING'|'DISTILLATION' }, ] }
Response Structure
(dict) --
nextToken (string) --
If the total number of results is greater than the maxResults value provided in the request, use this token when making another request in the nextToken field to return the next batch of results.
modelCustomizationJobSummaries (list) --
Job summaries.
(dict) --
Information about one customization job
jobArn (string) --
Amazon Resource Name (ARN) of the customization job.
baseModelArn (string) --
Amazon Resource Name (ARN) of the base model.
jobName (string) --
Name of the customization job.
status (string) --
Status of the customization job.
lastModifiedTime (datetime) --
Time that the customization job was last modified.
creationTime (datetime) --
Creation time of the custom model.
endTime (datetime) --
Time that the customization job ended.
customModelArn (string) --
Amazon Resource Name (ARN) of the custom model.
customModelName (string) --
Name of the custom model.
customizationType (string) --
Specifies whether to carry out continued pre-training of a model or whether to fine-tune it. For more information, see Custom models.
{'loggingConfig': {'videoDataDeliveryEnabled': 'boolean'}}
Set the configuration values for model invocation logging.
See also: AWS API Documentation
Request Syntax
client.put_model_invocation_logging_configuration( loggingConfig={ 'cloudWatchConfig': { 'logGroupName': 'string', 'roleArn': 'string', 'largeDataDeliveryS3Config': { 'bucketName': 'string', 'keyPrefix': 'string' } }, 's3Config': { 'bucketName': 'string', 'keyPrefix': 'string' }, 'textDataDeliveryEnabled': True|False, 'imageDataDeliveryEnabled': True|False, 'embeddingDataDeliveryEnabled': True|False, 'videoDataDeliveryEnabled': True|False } )
dict
[REQUIRED]
The logging configuration values to set.
cloudWatchConfig (dict) --
CloudWatch logging configuration.
logGroupName (string) -- [REQUIRED]
The log group name.
roleArn (string) -- [REQUIRED]
The role Amazon Resource Name (ARN).
largeDataDeliveryS3Config (dict) --
S3 configuration for delivering a large amount of data.
bucketName (string) -- [REQUIRED]
S3 bucket name.
keyPrefix (string) --
S3 prefix.
s3Config (dict) --
S3 configuration for storing log data.
bucketName (string) -- [REQUIRED]
S3 bucket name.
keyPrefix (string) --
S3 prefix.
textDataDeliveryEnabled (boolean) --
Set to include text data in the log delivery.
imageDataDeliveryEnabled (boolean) --
Set to include image data in the log delivery.
embeddingDataDeliveryEnabled (boolean) --
Set to include embeddings data in the log delivery.
videoDataDeliveryEnabled (boolean) --
Set to include video data in the log delivery.
dict
Response Syntax
{}
Response Structure
(dict) --