Delete Customization Target#
Prerequisites#
Before you can delete a customization target, make sure that you have:
The
namespace
the target belongs to.The
name
of the target.
You can get this information for all targets by listing the available targets.
Warning
Deleting a target deletes all the associated files from the disk.
You cannot delete a target if:
It is currently being used by an active customization job
It is already in
DELETING
status
Options#
You can delete a customization target in the following ways.
API#
Submit a DELETE request to
/v1/customization/targets/{namespace}/{name}
.curl --delete "${CUSTOMIZER_SERVICE_URL}/v1/customization/targets/meta/llama-3.1-8b-instruct@2.0"
Review the response.
Example Response
"message": "Deleting target from DB meta/llama-3.1-8b-instruct@2.0 and related files from disk"
Check the status of deleted target by using a GET request to
/v1/customization/targets/{namespace}/{name}
.curl --get "${CUSTOMIZER_SERVICE_URL}/v1/customization/targets/meta/llama-3.1-8b-instruct@2.0"
Review the response.
Example Response of Target Being Deleted
"Target meta/llama-3.1-8b-instruct@2.0 is currently being deleted"
Example Response of Target Failed to Delete
"Deletion failed for target meta/llama-3.1-8b-instruct@2.0, please retry deleting"
In this case, try deleting it again.
Example Response of Target Successfully Deleted
"Target meta/llama-3.1-8b-instruct@2.0 not found"
Once you have deleted the target, you can get the status by using get targets API. If the target is in tge DELETE_FAILED
status, try deleting it again using this API.