Cancels a running fine-tuning job.
Cancel a fine-tuning job
For Windows CMD, replace${DASHSCOPE_API_KEY}with%DASHSCOPE_API_KEY%. For PowerShell, replace it with$env:DASHSCOPE_API_KEY.
curl --location --request POST "https://dashscope.aliyuncs.com/api/v1/fine-tunes/<your-fine-tuning-job-id>/cancel" \
--header "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
--header 'Content-Type: application/json'
Input parameters
|
Parameter |
Type |
Location |
Required |
Description |
|
job_id |
String |
Path |
Yes |
The ID of the fine-tuning job to cancel. You can obtain this ID from the Create a fine-tuning job or List fine-tuning jobs operations. |
Sample response
{
"request_id": "670fca9d-48dd-4c5a-83e7-33bcc20420f8",
"output": {
"status": "success"
}
}
Response parameters
|
Parameter |
Type |
Description |
|
request_id |
String |
A unique identifier for the request. |
|
output |
Object |
Details about the cancellation result. |
Error codes
Returned when a request fails.
|
Parameter |
Type |
Description |
Example |
|
code |
String |
The error code. |
NotFound |
|
request_id |
String |
A unique identifier for the request. |
6332fb02-3111-43f0-bf79-f9e8c5ffa7f9 |
|
message |
String |
The error message. |
Not Found! |
Sample error response
{
"code": "NotFound",
"request_id": "BE213CDD-8A5C-59EE-9A67-055EAB0CB59B",
"message": "Not Found!"
}
Error code list
|
HTTP status code |
Error code |
Example message |
Description |
Solution |
|
400 |
InvalidParameter |
Missing training files |
An input parameter is missing or has an invalid format. |
Check the error message and correct the parameter. |
|
400 |
UnsupportedOperation |
The fine-tuning job cannot be deleted because it is succeeded, failed, or canceled |
The operation cannot be performed on a resource in its current state. |
Retry the operation when the resource enters an operable state. |
|
404 |
NotFound |
Not found! |
The requested resource was not found. |
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 error occurred on the server. |
Record the request ID and submit a ticket for troubleshooting. |