Bedrock / Client / get_custom_model
get_custom_model#
- Bedrock.Client.get_custom_model(**kwargs)#
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
response = client.get_custom_model( modelIdentifier='string' )
- Parameters:
modelIdentifier (string) –
[REQUIRED]
Name or Amazon Resource Name (ARN) of the custom model.
- Return type:
dict
- Returns:
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.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
s3Uri
. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBER
as the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBER
is as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
s3Uri (string) –
The URI of an invocation log in a bucket.
requestMetadataFilters (dict) –
Rules for filtering invocation logs based on request metadata.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
equals
,notEquals
,andAll
,orAll
. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBER
as the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBER
is as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
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.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
distillationConfig
. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBER
as the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBER
is as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
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.
Exceptions
Bedrock.Client.exceptions.ResourceNotFoundException
Bedrock.Client.exceptions.AccessDeniedException
Bedrock.Client.exceptions.ValidationException
Bedrock.Client.exceptions.InternalServerException
Bedrock.Client.exceptions.ThrottlingException