:doc:`SageMaker <../../sagemaker>` / Client / delete_training_job

*******************
delete_training_job
*******************



.. py:method:: SageMaker.Client.delete_training_job(**kwargs)

  

  Deletes a training job. After SageMaker deletes a training job, all of the metadata for the training job is lost. You can delete only training jobs that are in a terminal state ( ``Stopped``, ``Failed``, or ``Completed``) and don't retain an ``Available`` `managed warm pool <https://docs.aws.amazon.com/sagemaker/latest/dg/train-warm-pools.html>`__. You cannot delete a job that is in the ``InProgress`` or ``Stopping`` state. After deleting the job, you can reuse its name to create another training job.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteTrainingJob>`_  


  **Request Syntax**
  ::

    response = client.delete_training_job(
        TrainingJobName='string'
    )
    
  :type TrainingJobName: string
  :param TrainingJobName: **[REQUIRED]** 

    The name of the training job to delete.

    

  
  
  :returns: None
  **Exceptions**
  
  *   :py:class:`SageMaker.Client.exceptions.ResourceNotFound`

  
  *   :py:class:`SageMaker.Client.exceptions.ResourceInUse`

  