:doc:`Bedrock <../../bedrock>` / Client / get_model_customization_job

***************************
get_model_customization_job
***************************



.. py:method:: Bedrock.Client.get_model_customization_job(**kwargs)

  

  Retrieves the properties associated with a model-customization job, including the status of the job. For more information, see `Custom models <https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html>`__ in the `Amazon Bedrock User Guide <https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html>`__.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GetModelCustomizationJob>`_  


  **Request Syntax**
  ::

    response = client.get_model_customization_job(
        jobIdentifier='string'
    )
    
  :type jobIdentifier: string
  :param jobIdentifier: **[REQUIRED]** 

    Identifier for the customization job.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'jobArn': 'string',
          'jobName': 'string',
          'outputModelName': 'string',
          'outputModelArn': 'string',
          'clientRequestToken': 'string',
          'roleArn': 'string',
          'status': 'InProgress'|'Completed'|'Failed'|'Stopping'|'Stopped',
          'statusDetails': {
              'validationDetails': {
                  'status': 'InProgress'|'Completed'|'Stopping'|'Stopped'|'Failed'|'NotStarted',
                  'creationTime': datetime(2015, 1, 1),
                  'lastModifiedTime': datetime(2015, 1, 1)
              },
              'dataProcessingDetails': {
                  'status': 'InProgress'|'Completed'|'Stopping'|'Stopped'|'Failed'|'NotStarted',
                  'creationTime': datetime(2015, 1, 1),
                  'lastModifiedTime': datetime(2015, 1, 1)
              },
              'trainingDetails': {
                  'status': 'InProgress'|'Completed'|'Stopping'|'Stopped'|'Failed'|'NotStarted',
                  'creationTime': datetime(2015, 1, 1),
                  'lastModifiedTime': datetime(2015, 1, 1)
              }
          },
          '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'|'REINFORCEMENT_FINE_TUNING'|'IMPORTED',
          'outputModelKmsKeyArn': 'string',
          'trainingMetrics': {
              'trainingLoss': ...
          },
          'validationMetrics': [
              {
                  'validationLoss': ...
              },
          ],
          'vpcConfig': {
              'subnetIds': [
                  'string',
              ],
              'securityGroupIds': [
                  'string',
              ]
          },
          'customizationConfig': {
              'distillationConfig': {
                  'teacherModelConfig': {
                      'teacherModelIdentifier': 'string',
                      'maxResponseLengthForInference': 123
                  }
              },
              'rftConfig': {
                  'graderConfig': {
                      'lambdaGrader': {
                          'lambdaArn': 'string'
                      }
                  },
                  'hyperParameters': {
                      'epochCount': 123,
                      'batchSize': 123,
                      'learningRate': ...,
                      'maxPromptLength': 123,
                      'trainingSamplePerPrompt': 123,
                      'inferenceMaxTokens': 123,
                      'reasoningEffort': 'low'|'medium'|'high',
                      'evalInterval': 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.

        
      

      - **statusDetails** *(dict) --* 

        For a Distillation job, the details about the statuses of the sub-tasks of the customization job.

        
        

        - **validationDetails** *(dict) --* 

          The status details for the validation sub-task of the job.

          
          

          - **status** *(string) --* 

            The status of the validation sub-task of the job.

            
          

          - **creationTime** *(datetime) --* 

            The start time of the validation sub-task of the job.

            
          

          - **lastModifiedTime** *(datetime) --* 

            The latest update to the validation sub-task of the job.

            
      
        

        - **dataProcessingDetails** *(dict) --* 

          The status details for the data processing sub-task of the job.

          
          

          - **status** *(string) --* 

            The status of the data processing sub-task of the job.

            
          

          - **creationTime** *(datetime) --* 

            The start time of the data processing sub-task of the job.

            
          

          - **lastModifiedTime** *(datetime) --* 

            The latest update to the data processing sub-task of the job.

            
      
        

        - **trainingDetails** *(dict) --* 

          The status details for the training sub-task of the job.

          
          

          - **status** *(string) --* 

            The status of the training sub-task of the job.

            
          

          - **creationTime** *(datetime) --* 

            The start time of the training sub-task of the job.

            
          

          - **lastModifiedTime** *(datetime) --* 

            The latest update to the training sub-task of the job.

            
      
    
      

      - **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 <https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models-hp.html>`__.

        
        

        - *(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     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_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     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_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

        
        

        - **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.

        .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``distillationConfig``, ``rftConfig``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_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.

              
        
      
        

        - **rftConfig** *(dict) --* 

          Configuration settings for reinforcement fine-tuning (RFT) model customization, including grader configuration and hyperparameters.

          
          

          - **graderConfig** *(dict) --* 

            Configuration for the grader that evaluates model responses and provides reward signals during RFT training.

            .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``lambdaGrader``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


          
            

            - **lambdaGrader** *(dict) --* 

              Configuration for using an AWS Lambda function as the grader for evaluating model responses and provide reward signals in reinforcement fine-tuning.

              
              

              - **lambdaArn** *(string) --* 

                ARN of the AWS Lambda function that will evaluate model responses and return reward scores for RFT training.

                
          
        
          

          - **hyperParameters** *(dict) --* 

            Hyperparameters that control the reinforcement fine-tuning training process, including learning rate, batch size, and epoch count.

            
            

            - **epochCount** *(integer) --* 

              Number of training epochs to run during reinforcement fine-tuning. Higher values may improve performance but increase training time.

              
            

            - **batchSize** *(integer) --* 

              Number of training samples processed in each batch during reinforcement fine-tuning (RFT) training. Larger batches may improve training stability.

              
            

            - **learningRate** *(float) --* 

              Learning rate for the reinforcement fine-tuning. Controls how quickly the model adapts to reward signals.

              
            

            - **maxPromptLength** *(integer) --* 

              Maximum length of input prompts during RFT training, measured in tokens. Longer prompts allow more context but increase memory usage and training-time.

              
            

            - **trainingSamplePerPrompt** *(integer) --* 

              Number of response samples generated per prompt during RFT training. More samples provide better reward signal estimation.

              
            

            - **inferenceMaxTokens** *(integer) --* 

              Maximum number of tokens the model can generate in response to each prompt during RFT training.

              
            

            - **reasoningEffort** *(string) --* 

              Level of reasoning effort applied during RFT training. Higher values may improve response quality but increase training time.

              
            

            - **evalInterval** *(integer) --* 

              Interval between evaluation runs during RFT training, measured in training steps. More frequent evaluation provides better monitoring.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`Bedrock.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`Bedrock.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`Bedrock.Client.exceptions.ValidationException`

  
  *   :py:class:`Bedrock.Client.exceptions.InternalServerException`

  
  *   :py:class:`Bedrock.Client.exceptions.ThrottlingException`

  