This operation deletes a specified fine-tuning job.
Delete a fine-tuning job
In Windows Command Prompt (CMD), replace${DASHSCOPE_API_KEY}with%DASHSCOPE_API_KEY%. In PowerShell, use$env:DASHSCOPE_API_KEY.
curl --location --request DELETE "https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/<your-fine-tuning-job-id>" \
--header "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
--header 'Content-Type: application/json'
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
|
job_id |
String |
Path |
Yes |
The ID of the fine-tuning job to delete. You can obtain this ID from the Create a training job or List training jobs operations. |
Response example
{
"request_id": "7d7e1469-df77-4163-83ce-54425df744ed",
"output": {
"status": "success"
}
}
Response parameters
|
Parameter |
Type |
Description |
|
request_id |
String |
The system-generated unique ID for the request. |
|
output |
Object |
Details about the deletion operation. |
Error codes
Returned when the request fails.
|
Parameter |
Type |
Description |
Example |
|
code |
String |
The error code. |
NotFound |
|
request_id |
String |
The system-generated unique ID for the request. |
6332fb02-3111-43f0-bf79-f9e8c5ffa7f9 |
|
message |
String |
The error message. |
Not Found! |
The following is an example of an error response:
{
"code": "NotFound",
"request_id": "BE213CDD-8A5C-59EE-9A67-055EAB0CB59B",
"message": "Not Found!"
}
The following table lists the error codes:
|
HTTP status code |
Error code |
Example message |
Description |
Solution |
|
400 |
InvalidParameter |
Missing training files |
Invalid parameter. A required parameter might be missing or its format is incorrect. |
Review the error message and correct the request parameters. |
|
400 |
UnsupportedOperation |
The fine-tuning job cannot be deleted because it has succeeded, failed, or been canceled. |
The operation cannot be performed on the resource in its current state. |
Wait until the resource reaches an operational state before retrying the request. |
|
404 |
NotFound |
Not found! |
The requested resource does not exist. |
Verify that the resource ID is correct. |
|
409 |
Conflict |
Model instance xxxxx already exists, please specify a suffix |
A deployment instance with the specified name already exists. |
Specify a unique suffix for the deployment. |
|
429 |
Throttling |
|
The request was throttled because a platform limit was reached. |
|
|
500 |
InternalError |
Internal server error! |
An internal server error occurred. |
Record the |