forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Wuwan, Qi <wuwanqi1@noreply.gitea.eco.tsi-dev.otc-service.com> Co-committed-by: Wuwan, Qi <wuwanqi1@noreply.gitea.eco.tsi-dev.otc-service.com>
112 lines
9.7 KiB
HTML
112 lines
9.7 KiB
HTML
<a name="EN-US_TOPIC_0000001909907400"></a><a name="EN-US_TOPIC_0000001909907400"></a>
|
|
|
|
<h1 class="topictitle1">Stopping a Training Job</h1>
|
|
<div id="body1536890057472"><div class="section" id="EN-US_TOPIC_0000001909907400__section30162565"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001909907400__p462252415307">This API is used to stop a training job.</p>
|
|
<p id="EN-US_TOPIC_0000001909907400__p9162527">Calling this API is an asynchronous operation. The job status can be obtained by calling the APIs described in <a href="modelarts_03_0046.html">Querying a Training Job List</a> and <a href="modelarts_03_0047.html">Querying the Details About a Training Job Version</a>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001909907400__section3027630"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0000001909907400__p12904164302">POST /v1/{project_id}/training-jobs/{job_id}/versions/{version_id}/stop</p>
|
|
<div class="p" id="EN-US_TOPIC_0000001909907400__p770143416307"><a href="#EN-US_TOPIC_0000001909907400__table38721821155840">Table 1</a> describes the required parameters.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001909907400__table38721821155840"></a><a name="table38721821155840"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001909907400__table38721821155840" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001909907400__row43000284155840"><th align="left" class="cellrowborder" valign="top" width="17.51%" id="mcps1.3.2.3.2.2.5.1.1"><p id="EN-US_TOPIC_0000001909907400__p2689837315592">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.709999999999999%" id="mcps1.3.2.3.2.2.5.1.2"><p id="EN-US_TOPIC_0000001909907400__p3128459315592">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.27%" id="mcps1.3.2.3.2.2.5.1.3"><p id="EN-US_TOPIC_0000001909907400__p5102406515592">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="54.510000000000005%" id="mcps1.3.2.3.2.2.5.1.4"><p id="EN-US_TOPIC_0000001909907400__p3930857315592">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001909907400__row8226193155840"><td class="cellrowborder" valign="top" width="17.51%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001909907400__p418844415592">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.709999999999999%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001909907400__p371969415592">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.27%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001909907400__p3285982115592">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.510000000000005%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001909907400__p4439984015592">Project ID. For details about how to obtain a project ID, see <a href="modelarts_03_0147.html">Obtaining a Project ID and Name</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001909907400__row1425542155840"><td class="cellrowborder" valign="top" width="17.51%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001909907400__p5488438815592">job_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.709999999999999%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001909907400__p1645043715592">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.27%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001909907400__p5741698615592">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.510000000000005%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001909907400__p2026426715592">ID of a training job</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001909907400__row5324173613167"><td class="cellrowborder" valign="top" width="17.51%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001909907400__p1324436161611">version_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.709999999999999%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001909907400__p1327645412169">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.27%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001909907400__p1932443613163">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.510000000000005%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001909907400__p9134192081113">Version ID of a training job</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001909907400__section441563135511"><h4 class="sectiontitle">Request Body</h4><p id="EN-US_TOPIC_0000001909907400__p1560514112019">None</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001909907400__section43911483"><h4 class="sectiontitle">Response Body</h4><div class="p" id="EN-US_TOPIC_0000001909907400__p05231735163512"><a href="#EN-US_TOPIC_0000001909907400__table61691357155927">Table 2</a> describes the response parameters.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001909907400__table61691357155927"></a><a name="table61691357155927"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001909907400__table61691357155927" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001909907400__row32271610155927"><th align="left" class="cellrowborder" valign="top" width="17.328267173282672%" id="mcps1.3.4.2.2.2.4.1.1"><p id="EN-US_TOPIC_0000001909907400__p63651488155944">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.508649135086493%" id="mcps1.3.4.2.2.2.4.1.2"><p id="EN-US_TOPIC_0000001909907400__p66066406155944">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="69.16308369163083%" id="mcps1.3.4.2.2.2.4.1.3"><p id="EN-US_TOPIC_0000001909907400__p49778641155944">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001909907400__row1268391823516"><td class="cellrowborder" valign="top" width="17.328267173282672%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001909907400__p2530905217407">is_success</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.508649135086493%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001909907400__p2536505617407">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="69.16308369163083%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001909907400__p4130369517407">Whether the request is successful</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001909907400__row341513612180"><td class="cellrowborder" valign="top" width="17.328267173282672%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001909907400__p1415665185">error_message</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.508649135086493%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001909907400__p174152067182">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="69.16308369163083%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001909907400__p17985833171818">Error message of a failed API call.</p>
|
|
<p id="EN-US_TOPIC_0000001909907400__p179882033201819">This parameter is not included when the API call succeeds.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001909907400__row29721694155927"><td class="cellrowborder" valign="top" width="17.328267173282672%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001909907400__p26964844155944">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.508649135086493%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001909907400__p17378453155944">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="69.16308369163083%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001909907400__p65477428155944">Error code of a failed API call. For details, see <a href="modelarts_03_0095.html">Error Codes</a>.</p>
|
|
<p id="EN-US_TOPIC_0000001909907400__p2071440155944">This parameter is not included when the API call succeeds.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001909907400__section163412148342"><h4 class="sectiontitle">Sample Request</h4><p id="EN-US_TOPIC_0000001909907400__p188854446388">The following shows how to stop a version of the job whose <span class="parmvalue" id="EN-US_TOPIC_0000001909907400__parmvalue75311136143019"><b>job_id</b></span> is <strong id="EN-US_TOPIC_0000001909907400__b16668142012488">10</strong> and <span class="parmvalue" id="EN-US_TOPIC_0000001909907400__parmvalue594013394303"><b>version_id</b></span> is <strong id="EN-US_TOPIC_0000001909907400__b3668120104810">10</strong>.</p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001909907400__screen617124512918">POST https://endpoint/v1/{project_id}/training-jobs/10/versions/10/stop</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001909907400__section20265155522910"><h4 class="sectiontitle">Sample Response</h4><ul id="EN-US_TOPIC_0000001909907400__ul220045153019"><li id="EN-US_TOPIC_0000001909907400__li7200135123012">Successful response<pre class="screen" id="EN-US_TOPIC_0000001909907400__screen9200557305">{
|
|
"is_success": true
|
|
}</pre>
|
|
</li><li id="EN-US_TOPIC_0000001909907400__li112000573010">Failed response<pre class="screen" id="EN-US_TOPIC_0000001909907400__screen020185193011">{
|
|
"is_success": false,
|
|
"error_message": "Error string",
|
|
"error_code": "ModelArts.0105"
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001909907400__section16342114917109"><h4 class="sectiontitle">Status Code</h4><p id="EN-US_TOPIC_0000001909907400__p1731954913014">For details about the status code, see <a href="modelarts_03_0094.html">Status Code</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="modelarts_03_0044.html">Training Jobs</a></div>
|
|
</div>
|
|
</div>
|
|
|