doc-exports/docs/modelarts/api-ref/modelarts_03_0054.html
Beibei 525370b67d
ModelArts GA API 06052022 from R&D (#14)
ModelArts GA API 06052022 from R&D

R&D has provided a right version of ModelArts GA API (06052022)

Reviewed-by: Artem Goncharov <Artem.goncharov@gmail.com>
2022-05-23 16:26:34 +00:00

122 lines
11 KiB
HTML

<a name="modelarts_03_0054"></a><a name="modelarts_03_0054"></a>
<h1 class="topictitle1">Obtaining the Name of a Training Job Log File</h1>
<div id="body8662426"><div class="section" id="modelarts_03_0054__en-us_topic_0131304290_section43804588"><h4 class="sectiontitle">Function</h4><p id="modelarts_03_0054__en-us_topic_0131304290_p11927413">This API is used to obtain the name of a training job log file.</p>
</div>
<div class="section" id="modelarts_03_0054__en-us_topic_0131304290_section58696980"><h4 class="sectiontitle">URI</h4><p id="modelarts_03_0054__en-us_topic_0131304290_p911665119334">GET /v1/{project_id}/training-jobs/{job_id}/versions/{version_id}/log/file-names</p>
<div class="p" id="modelarts_03_0054__en-us_topic_0131304290_p9934123094819"><a href="#modelarts_03_0054__en-us_topic_0131304290_table4669394316232">Table 1</a> describes the required parameters.
<div class="tablenoborder"><a name="modelarts_03_0054__en-us_topic_0131304290_table4669394316232"></a><a name="en-us_topic_0131304290_table4669394316232"></a><table cellpadding="4" cellspacing="0" summary="" id="modelarts_03_0054__en-us_topic_0131304290_table4669394316232" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="modelarts_03_0054__en-us_topic_0131304290_row1698378816232"><th align="left" class="cellrowborder" valign="top" width="18.181818181818183%" id="mcps1.3.2.3.2.2.5.1.1"><p id="modelarts_03_0054__en-us_topic_0131304290_p3928616250">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.151515151515152%" id="mcps1.3.2.3.2.2.5.1.2"><p id="modelarts_03_0054__en-us_topic_0131304290_p318220716250">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.121212121212121%" id="mcps1.3.2.3.2.2.5.1.3"><p id="modelarts_03_0054__en-us_topic_0131304290_p5643224916250">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="54.545454545454554%" id="mcps1.3.2.3.2.2.5.1.4"><p id="modelarts_03_0054__en-us_topic_0131304290_p760948416250">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="modelarts_03_0054__en-us_topic_0131304290_row6661219316232"><td class="cellrowborder" valign="top" width="18.181818181818183%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="modelarts_03_0054__en-us_topic_0131304290_p6394012216250">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="15.151515151515152%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="modelarts_03_0054__en-us_topic_0131304290_p1176739816250">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="12.121212121212121%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="modelarts_03_0054__en-us_topic_0131304290_p1363517816250">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.545454545454554%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="modelarts_03_0054__en-us_topic_0131304290_p3070766316250">Project ID. For details about how to obtain the project ID, see <a href="modelarts_03_0147.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="modelarts_03_0054__en-us_topic_0131304290_row2898837316232"><td class="cellrowborder" valign="top" width="18.181818181818183%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="modelarts_03_0054__en-us_topic_0131304290_p1217225116250">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="15.151515151515152%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="modelarts_03_0054__en-us_topic_0131304290_p4642824116250">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="12.121212121212121%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="modelarts_03_0054__en-us_topic_0131304290_p259117616250">Long</p>
</td>
<td class="cellrowborder" valign="top" width="54.545454545454554%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="modelarts_03_0054__en-us_topic_0131304290_p855869516250">ID of a training job</p>
</td>
</tr>
<tr id="modelarts_03_0054__en-us_topic_0131304290_row212991911419"><td class="cellrowborder" valign="top" width="18.181818181818183%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="modelarts_03_0054__en-us_topic_0131304290_p1131191914416">version_id</p>
</td>
<td class="cellrowborder" valign="top" width="15.151515151515152%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="modelarts_03_0054__en-us_topic_0131304290_p453211267419">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="12.121212121212121%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="modelarts_03_0054__en-us_topic_0131304290_p15131119148">Long</p>
</td>
<td class="cellrowborder" valign="top" width="54.545454545454554%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="modelarts_03_0054__en-us_topic_0131304290_p15131161912419">Version ID of a training job</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="modelarts_03_0054__en-us_topic_0131304290_section441563135511"><h4 class="sectiontitle">Request Body</h4><p id="modelarts_03_0054__en-us_topic_0131304290_p1560514112019">None</p>
</div>
<div class="section" id="modelarts_03_0054__en-us_topic_0131304290_section41752178"><h4 class="sectiontitle">Response Body</h4><div class="p" id="modelarts_03_0054__en-us_topic_0131304290_p11831964210"><a href="#modelarts_03_0054__en-us_topic_0131304290_table3969737616316">Table 2</a> describes the response parameters.
<div class="tablenoborder"><a name="modelarts_03_0054__en-us_topic_0131304290_table3969737616316"></a><a name="en-us_topic_0131304290_table3969737616316"></a><table cellpadding="4" cellspacing="0" summary="" id="modelarts_03_0054__en-us_topic_0131304290_table3969737616316" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="modelarts_03_0054__en-us_topic_0131304290_row4420603516316"><th align="left" class="cellrowborder" valign="top" width="18%" id="mcps1.3.4.2.2.2.4.1.1"><p id="modelarts_03_0054__en-us_topic_0131304290_p201671416332">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.4.2.2.2.4.1.2"><p id="modelarts_03_0054__en-us_topic_0131304290_p1121753616332">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="67%" id="mcps1.3.4.2.2.2.4.1.3"><p id="modelarts_03_0054__en-us_topic_0131304290_p3620524816332">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="modelarts_03_0054__en-us_topic_0131304290_row4112635105011"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="modelarts_03_0054__en-us_topic_0131304290_p2530905217407">is_success</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="modelarts_03_0054__en-us_topic_0131304290_p2536505617407">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="67%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="modelarts_03_0054__en-us_topic_0131304290_p4130369517407">Whether the request is successful</p>
</td>
</tr>
<tr id="modelarts_03_0054__en-us_topic_0131304290_row13693818959"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="modelarts_03_0054__en-us_topic_0131304290_p36949182517">error_message</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="modelarts_03_0054__en-us_topic_0131304290_p4694111814518">String</p>
</td>
<td class="cellrowborder" valign="top" width="67%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="modelarts_03_0054__en-us_topic_0131304290_p1883217281754">Error message of a failed API call.</p>
<p id="modelarts_03_0054__en-us_topic_0131304290_p283417281056">This parameter is not included when the API call succeeds.</p>
</td>
</tr>
<tr id="modelarts_03_0054__en-us_topic_0131304290_row1122668316316"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="modelarts_03_0054__en-us_topic_0131304290_p2549041516332">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="modelarts_03_0054__en-us_topic_0131304290_p732886516332">String</p>
</td>
<td class="cellrowborder" valign="top" width="67%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="modelarts_03_0054__en-us_topic_0131304290_p5676720116332">Error code of a failed API call. For details, see <a href="modelarts_03_0095.html">Error Codes</a>. This parameter is not included when the API call succeeds.</p>
</td>
</tr>
<tr id="modelarts_03_0054__en-us_topic_0131304290_row977626816316"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="modelarts_03_0054__en-us_topic_0131304290_p306381116332">log_file_list</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="modelarts_03_0054__en-us_topic_0131304290_p3611764516332">String</p>
</td>
<td class="cellrowborder" valign="top" width="67%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="modelarts_03_0054__en-us_topic_0131304290_p3984816716332">Log file name of a training job. A single-node job has only one log file, and a distributed job has multiple log files.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="modelarts_03_0054__en-us_topic_0131304290_section443195819497"><h4 class="sectiontitle">Samples</h4><p id="modelarts_03_0054__en-us_topic_0131304290_p4865841105211">The following shows how to obtain the log files of the job whose <span class="parmname" id="modelarts_03_0054__en-us_topic_0131304290_parmname82704018156"><b>job_id</b></span> is <span class="parmvalue" id="modelarts_03_0054__en-us_topic_0131304290_parmvalue179443442153"><b>10</b></span> and <span class="parmname" id="modelarts_03_0054__en-us_topic_0131304290_parmname488519502152"><b>version_id</b></span> is <span class="parmvalue" id="modelarts_03_0054__en-us_topic_0131304290_parmvalue13856165614155"><b>10</b></span>.</p>
<ul id="modelarts_03_0054__en-us_topic_0131304290_ul66305688"><li id="modelarts_03_0054__en-us_topic_0131304290_li59880282">Sample request<pre class="screen" id="modelarts_03_0054__en-us_topic_0131304290_screen110029203411">GET https://endpoint/v1/{project_id}/training-jobs/10/versions/10/log/file-names</pre>
</li></ul>
</div>
<ul id="modelarts_03_0054__en-us_topic_0131304290_ul19241178"><li id="modelarts_03_0054__en-us_topic_0131304290_li38952882">Successful sample response<pre class="screen" id="modelarts_03_0054__en-us_topic_0131304290_screen63773395346">{
"is_success": true,
"log_file_list": [
"teseJob.0"
]
}</pre>
</li><li id="modelarts_03_0054__en-us_topic_0131304290_li11957132512175">Failed sample response<pre class="screen" id="modelarts_03_0054__en-us_topic_0131304290_screen2113492345">{
"is_success": false,
"error_message": "Error string",
"error_code": "ModelArts.0105"
}</pre>
</li></ul>
<div class="section" id="modelarts_03_0054__en-us_topic_0131304290_section16342114917109"><h4 class="sectiontitle">Status Code</h4><p id="modelarts_03_0054__en-us_topic_0131304290_p13114154211153">For details about the status code, see <a href="modelarts_03_0094.html">Status Code</a>.</p>
</div>
<div class="section" id="modelarts_03_0054__section27281325181210"><h4 class="sectiontitle">Error Codes</h4><p id="modelarts_03_0054__p1572811255123">See <a href="modelarts_03_0095.html">Error Codes</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>