:doc:`NeptuneData <../../neptunedata>` / Client / cancel_ml_model_training_job

****************************
cancel_ml_model_training_job
****************************



.. py:method:: NeptuneData.Client.cancel_ml_model_training_job(**kwargs)

  

  Cancels a Neptune ML model training job. See `Model training using the modeltraining command <https://docs.aws.amazon.com/neptune/latest/userguide/machine-learning-api-modeltraining.html>`__.

   

  When invoking this operation in a Neptune cluster that has IAM authentication enabled, the IAM user or role making the request must have a policy attached that allows the `neptune-db\:CancelMLModelTrainingJob <https://docs.aws.amazon.com/neptune/latest/userguide/iam-dp-actions.html#cancelmlmodeltrainingjob>`__ IAM action in that cluster.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/neptunedata-2023-08-01/CancelMLModelTrainingJob>`_  


  **Request Syntax**
  ::

    response = client.cancel_ml_model_training_job(
        id='string',
        neptuneIamRoleArn='string',
        clean=True|False
    )
    
  :type id: string
  :param id: **[REQUIRED]** 

    The unique identifier of the model-training job to be canceled.

    

  
  :type neptuneIamRoleArn: string
  :param neptuneIamRoleArn: 

    The ARN of an IAM role that provides Neptune access to SageMaker and Amazon S3 resources. This must be listed in your DB cluster parameter group or an error will occur.

    

  
  :type clean: boolean
  :param clean: 

    If set to ``TRUE``, this flag specifies that all Amazon S3 artifacts should be deleted when the job is stopped. The default is ``FALSE``.

    

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

    
    ::

      {
          'status': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        The status of the cancellation.

        
  
  **Exceptions**
  
  *   :py:class:`NeptuneData.Client.exceptions.UnsupportedOperationException`

  
  *   :py:class:`NeptuneData.Client.exceptions.BadRequestException`

  
  *   :py:class:`NeptuneData.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`NeptuneData.Client.exceptions.MLResourceNotFoundException`

  
  *   :py:class:`NeptuneData.Client.exceptions.ClientTimeoutException`

  
  *   :py:class:`NeptuneData.Client.exceptions.PreconditionsFailedException`

  
  *   :py:class:`NeptuneData.Client.exceptions.ConstraintViolationException`

  
  *   :py:class:`NeptuneData.Client.exceptions.InvalidArgumentException`

  
  *   :py:class:`NeptuneData.Client.exceptions.MissingParameterException`

  
  *   :py:class:`NeptuneData.Client.exceptions.IllegalArgumentException`

  
  *   :py:class:`NeptuneData.Client.exceptions.TooManyRequestsException`

  