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>
194 lines
16 KiB
HTML
194 lines
16 KiB
HTML
<a name="EN-US_TOPIC_0000001909747528"></a><a name="EN-US_TOPIC_0000001909747528"></a>
|
|
|
|
<h1 class="topictitle1">Querying Training Job Logs</h1>
|
|
<div id="body1566876765650"><div class="section" id="EN-US_TOPIC_0000001909747528__section59889949"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001909747528__p25674946">This API is used to obtain detailed information about training job logs by row.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001909747528__section2138635"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0000001909747528__p37992218355">GET /v1/{project_id}/training-jobs/{job_id}/versions/{version_id}/aom-log</p>
|
|
<div class="p" id="EN-US_TOPIC_0000001909747528__p65771147125313"><a href="#EN-US_TOPIC_0000001909747528__table4442765616454">Table 1</a> describes the required parameters.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001909747528__table4442765616454"></a><a name="table4442765616454"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001909747528__table4442765616454" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001909747528__row1885755016454"><th align="left" class="cellrowborder" valign="top" width="16.439999999999998%" id="mcps1.3.2.3.2.2.5.1.1"><p id="EN-US_TOPIC_0000001909747528__p2131794716511">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.73%" id="mcps1.3.2.3.2.2.5.1.2"><p id="EN-US_TOPIC_0000001909747528__p4903214216511">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="11.360000000000001%" id="mcps1.3.2.3.2.2.5.1.3"><p id="EN-US_TOPIC_0000001909747528__p1218057416511">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="56.47%" id="mcps1.3.2.3.2.2.5.1.4"><p id="EN-US_TOPIC_0000001909747528__p4710241816511">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001909747528__row5911821816454"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001909747528__p264845616511">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.73%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001909747528__p1319836116511">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.360000000000001%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001909747528__p6243435216511">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.47%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001909747528__p2401771416511">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_0000001909747528__row467320216454"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001909747528__p861340516511">job_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.73%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001909747528__p2659720516511">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.360000000000001%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001909747528__p689001016511">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.47%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001909747528__p2121992316511">ID of a training job</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001909747528__row2274948268"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001909747528__p427412487612">version_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.73%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001909747528__p13953156365">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.360000000000001%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001909747528__p162743482617">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.47%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001909747528__p1427434811615">Version ID of a training job</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001909747528__table105084321419" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Query parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001909747528__row1350973181417"><th align="left" class="cellrowborder" valign="top" width="16.53%" id="mcps1.3.2.4.2.5.1.1"><p id="EN-US_TOPIC_0000001909747528__p3509133131417">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.75%" id="mcps1.3.2.4.2.5.1.2"><p id="EN-US_TOPIC_0000001909747528__p1350913101418">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="11.08%" id="mcps1.3.2.4.2.5.1.3"><p id="EN-US_TOPIC_0000001909747528__p1450916321417">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="56.64%" id="mcps1.3.2.4.2.5.1.4"><p id="EN-US_TOPIC_0000001909747528__p1950910381414">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001909747528__row165093319144"><td class="cellrowborder" valign="top" width="16.53%" headers="mcps1.3.2.4.2.5.1.1 "><p id="EN-US_TOPIC_0000001909747528__p105093331418">base_line</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.75%" headers="mcps1.3.2.4.2.5.1.2 "><p id="EN-US_TOPIC_0000001909747528__p150918301413">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.08%" headers="mcps1.3.2.4.2.5.1.3 "><p id="EN-US_TOPIC_0000001909747528__p135096371416">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.64%" headers="mcps1.3.2.4.2.5.1.4 "><p id="EN-US_TOPIC_0000001909747528__p1450919315144">Base line of the log, which is obtained from an API response. If the value is empty, the latest log is obtained.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001909747528__row0509334144"><td class="cellrowborder" valign="top" width="16.53%" headers="mcps1.3.2.4.2.5.1.1 "><p id="EN-US_TOPIC_0000001909747528__p185094316143">lines</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.75%" headers="mcps1.3.2.4.2.5.1.2 "><p id="EN-US_TOPIC_0000001909747528__p750919311412">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.08%" headers="mcps1.3.2.4.2.5.1.3 "><p id="EN-US_TOPIC_0000001909747528__p1650914311146">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.64%" headers="mcps1.3.2.4.2.5.1.4 "><p id="EN-US_TOPIC_0000001909747528__p175097318149">Length of the obtained log. The default value is 50 lines. The value range is [0, 500].</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001909747528__row050919391411"><td class="cellrowborder" valign="top" width="16.53%" headers="mcps1.3.2.4.2.5.1.1 "><p id="EN-US_TOPIC_0000001909747528__p850915331411">log_file</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.75%" headers="mcps1.3.2.4.2.5.1.2 "><p id="EN-US_TOPIC_0000001909747528__p25095391418">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.08%" headers="mcps1.3.2.4.2.5.1.3 "><p id="EN-US_TOPIC_0000001909747528__p16509538148">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.64%" headers="mcps1.3.2.4.2.5.1.4 "><p id="EN-US_TOPIC_0000001909747528__p6509153191415">Name of the log file to be viewed. For details about how to obtain the log file name, see <a href="modelarts_03_0054.html">Obtaining the Name of a Training Job Log File</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001909747528__row650910318144"><td class="cellrowborder" valign="top" width="16.53%" headers="mcps1.3.2.4.2.5.1.1 "><p id="EN-US_TOPIC_0000001909747528__p950919311143">order</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.75%" headers="mcps1.3.2.4.2.5.1.2 "><p id="EN-US_TOPIC_0000001909747528__p1350914313142">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.08%" headers="mcps1.3.2.4.2.5.1.3 "><p id="EN-US_TOPIC_0000001909747528__p9509163111418">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.64%" headers="mcps1.3.2.4.2.5.1.4 "><p id="EN-US_TOPIC_0000001909747528__p1509736144">Log query direction</p>
|
|
<ul id="EN-US_TOPIC_0000001909747528__ul1550918312145"><li id="EN-US_TOPIC_0000001909747528__li1509539149"><strong id="EN-US_TOPIC_0000001909747528__b1620711013910">desc</strong>: Query next records.</li><li id="EN-US_TOPIC_0000001909747528__li750911351420"><strong id="EN-US_TOPIC_0000001909747528__b9262115103811">asc</strong>: Query previous records.</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001909747528__section14721183115213"><h4 class="sectiontitle">Request Body</h4><p id="EN-US_TOPIC_0000001909747528__p215516381222">None</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001909747528__section15561295"><h4 class="sectiontitle">Response Body</h4><div class="p" id="EN-US_TOPIC_0000001909747528__p1422850741"><a href="#EN-US_TOPIC_0000001909747528__table1414514116749">Table 3</a> describes the response parameters.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001909747528__table1414514116749"></a><a name="table1414514116749"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001909747528__table1414514116749" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001909747528__row1296552316749"><th align="left" class="cellrowborder" valign="top" width="16.689999999999998%" id="mcps1.3.4.2.2.2.4.1.1"><p id="EN-US_TOPIC_0000001909747528__p452264431685">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.68%" id="mcps1.3.4.2.2.2.4.1.2"><p id="EN-US_TOPIC_0000001909747528__p424067391685">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="70.63000000000001%" id="mcps1.3.4.2.2.2.4.1.3"><p id="EN-US_TOPIC_0000001909747528__p123938441685">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001909747528__row379107356"><td class="cellrowborder" valign="top" width="16.689999999999998%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001909747528__p3678195015417">error_message</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.68%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001909747528__p367815017542">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.63000000000001%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001909747528__p146788503545">Error message of a failed API call.</p>
|
|
<p id="EN-US_TOPIC_0000001909747528__p767865010549">This parameter is not included when the API call succeeds.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001909747528__row95021353811"><td class="cellrowborder" valign="top" width="16.689999999999998%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001909747528__p11679105018547">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.68%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001909747528__p1267985011549">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.63000000000001%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001909747528__p0679850175418">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_0000001909747528__p19679165010545">This parameter is not included when the API call succeeds.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001909747528__row1722835016749"><td class="cellrowborder" valign="top" width="16.689999999999998%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001909747528__p66791450125415">content</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.68%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001909747528__p14679105018543">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.63000000000001%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001909747528__p26797507547">Content of the requested log</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001909747528__row5468243216749"><td class="cellrowborder" valign="top" width="16.689999999999998%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001909747528__p106791550185420">lines</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.68%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001909747528__p19679185085415">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.63000000000001%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001909747528__p166791150135420">Lines of the obtained logs</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001909747528__row2034114592315"><td class="cellrowborder" valign="top" width="16.689999999999998%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001909747528__p9679125012541">start_line</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.68%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001909747528__p176791508545">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.63000000000001%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001909747528__p4679145085412">Start position of the obtained log</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001909747528__row655612121183"><td class="cellrowborder" valign="top" width="16.689999999999998%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001909747528__p967995005417">end_line</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.68%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001909747528__p176797504547">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.63000000000001%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001909747528__p168085014548">End position of the obtained log</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001909747528__row1269012524588"><td class="cellrowborder" valign="top" width="16.689999999999998%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001909747528__p1755631210811">is_success</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.68%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001909747528__p455691212818">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70.63000000000001%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001909747528__p3556121216814">Whether the request is successful</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001909747528__section828415581838"><h4 class="sectiontitle">Sample Request</h4><p id="EN-US_TOPIC_0000001909747528__p7208203917515">The following shows how to obtain the logs contained in <span class="filepath" id="EN-US_TOPIC_0000001909747528__filepath136125617525"><b>log1.log</b></span> of the job whose <span class="parmvalue" id="EN-US_TOPIC_0000001909747528__parmvalue512135635211"><b>job_id</b></span> is <strong id="EN-US_TOPIC_0000001909747528__b13121056135212">10</strong> and <span class="parmvalue" id="EN-US_TOPIC_0000001909747528__parmvalue17121956195211"><b>version_id</b></span> is <strong id="EN-US_TOPIC_0000001909747528__b712135616529">10</strong>.</p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001909747528__screen14130142710335">GET https://endpoint/v1/{project_id}/training-jobs/10/versions/10/aom-log?log_file=log1.log&base_line= 1551252759254000002&lines=50&order=desc</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001909747528__section1186065610338"><h4 class="sectiontitle">Sample Response</h4><ul id="EN-US_TOPIC_0000001909747528__ul1785919251373"><li id="EN-US_TOPIC_0000001909747528__li385992515378">Successful response<pre class="screen" id="EN-US_TOPIC_0000001909747528__screen12859525143719">{
|
|
"is_success": true,
|
|
"start_line":1551252759254000002,
|
|
"content": "Log string",
|
|
"end_line": "1551252759254000003",
|
|
"lines": "1"
|
|
}</pre>
|
|
</li><li id="EN-US_TOPIC_0000001909747528__li7859525153710">Failed response<pre class="screen" id="EN-US_TOPIC_0000001909747528__screen485918259379">{
|
|
"is_success": false,
|
|
"error_message": "Error string",
|
|
"error_code": "ModelArts.0105"
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001909747528__section16342114917109"><h4 class="sectiontitle">Status Code</h4><p id="EN-US_TOPIC_0000001909747528__p19942204915154">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>
|
|
|