Stopping a Training Job
Function
This API is used to stop a training job.
Calling this API is an asynchronous operation. The job status can be obtained by calling the APIs described in Querying the List of Training Jobs and Querying the Details About a Training Job Version.
URI
POST /v1/{project_id}/training-jobs/{job_id}/versions/{version_id}/stop
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
|
job_id |
Yes |
Long |
ID of a training job |
|
version_id |
Yes |
Long |
Version ID of a training job |
Request Body
None
Response Body
|
Parameter |
Type |
Description |
|---|---|---|
|
is_success |
Boolean |
Whether the request is successful |
|
error_msg |
String |
Error message of a failed API call. This parameter is not included when the API call succeeds. |
|
error_code |
String |
Error code of a failed API call. For details, see Error Code. This parameter is not included when the API call succeeds. |
Samples
The following shows how to stop a version of the job whose job_id is 10 and version_id is 10.
- Sample request
POST https://endpoint/v1/{project_id}/training-jobs/10/versions/10/stop
- Successful sample response
{ "is_success": true } - Failed sample response
{ "is_success": false, "error_msg": "Error string", "error_code": "ModelArts.0105" }
Status Code
For details about the status code, see Status Code.
Last Article: Creating a Version of a Training Job
Next Article: Modifying the Description of a Training Job
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.