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>
149 lines
13 KiB
HTML
149 lines
13 KiB
HTML
<a name="EN-US_TOPIC_0000002341058466"></a><a name="EN-US_TOPIC_0000002341058466"></a>
|
|
|
|
<h1 class="topictitle1">Querying the Logs of a Specified Task in a Given Training Job (Preview)</h1>
|
|
<div id="body32001227"><div class="section" id="EN-US_TOPIC_0000002341058466__section4541168113"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000002341058466__p45426151116">This API is used to query the logs of a specified task in a given training job (preview).</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000002341058466__section1854166131110"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0000002341058466__p7541661115">GET /v2/{project_id}/training-jobs/{training_job_id}/tasks/{task_id}/logs/preview</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002341058466__table135515610114" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000002341058466__row85510631118"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="EN-US_TOPIC_0000002341058466__p14551262118">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="EN-US_TOPIC_0000002341058466__p1568631113">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="EN-US_TOPIC_0000002341058466__p1156668118">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="EN-US_TOPIC_0000002341058466__p20568618111">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000002341058466__row35511610116"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0000002341058466__p12566691115">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0000002341058466__p75611651110">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0000002341058466__p185616618118">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0000002341058466__p256265113">Project ID. For details, see <a href="modelarts_03_0147.html">Obtaining a Project ID and Name</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000002341058466__row10551765112"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0000002341058466__p13561064117">training_job_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0000002341058466__p1356196171118">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0000002341058466__p1056186131110">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0000002341058466__p1357196131111">Training job ID For details about how to obtain the value, see <a href="ListTrainingJobs.html">Querying the Training Job List</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000002341058466__row55512651114"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0000002341058466__p5576615119">task_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0000002341058466__p10572620116">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0000002341058466__p10571863110">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0000002341058466__p155736141115">Name of a training job. You can obtain the value from the <strong id="EN-US_TOPIC_0000002341058466__b55717611118">status.tasks</strong> field in the training job details.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000002341058466__row12551612118"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0000002341058466__p85726191117">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0000002341058466__p657461118">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0000002341058466__p85714661117">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0000002341058466__p1957186131117">Project ID. For details, see <a href="modelarts_03_0147.html">Obtaining a Project ID and Name</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000002341058466__row95514610113"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0000002341058466__p12581567113">training_job_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0000002341058466__p1958762116">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0000002341058466__p105814691114">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0000002341058466__p17581062119">Training job ID For details about how to obtain the value, see <a href="ListTrainingJobs.html">Querying the Training Job List</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000002341058466__row15556201119"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0000002341058466__p95866141113">task_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0000002341058466__p145886171113">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0000002341058466__p65820601116">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0000002341058466__p19588616118">Name of a training job. You can obtain the value from the <strong id="EN-US_TOPIC_0000002341058466__b158062118">status.tasks</strong> field in the training job details.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000002341058466__section1558156181114"><h4 class="sectiontitle">Request Parameters</h4><p id="EN-US_TOPIC_0000002341058466__p5591761112">None</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000002341058466__section195919681118"><h4 class="sectiontitle">Response Parameters</h4><p id="EN-US_TOPIC_0000002341058466__p05916618115"><strong id="EN-US_TOPIC_0000002341058466__b145914617115">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002341058466__en-us_topic_0000002091282813_response_TrainLog" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response body parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000002341058466__row12593641115"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.1"><p id="EN-US_TOPIC_0000002341058466__p12603631111">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.2"><p id="EN-US_TOPIC_0000002341058466__p260156161113">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="EN-US_TOPIC_0000002341058466__p360768113">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000002341058466__row45936171115"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002341058466__p16010614118">content</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002341058466__p146017621120">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002341058466__p1660762115">Log content. If the size of a log file does not exceed the upper limit (n MB), all the log files are returned. Otherwise, the latest log file (n MB) is returned. After 2022/03/01 00:00:00 (GMT+08:00), the parameter name is changed from context to content.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000002341058466__row165911611112"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002341058466__p46113691118">current_size</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002341058466__p761566119">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002341058466__p12618681112">Size of the returned log content, in bytes. The maximum size is 5 MB.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000002341058466__row1592601112"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002341058466__p106115619116">full_size</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002341058466__p166146181120">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002341058466__p9627614110">Size of complete log content, in bytes</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000002341058466__section0629621116"><h4 class="sectiontitle">Example Requests</h4><p id="EN-US_TOPIC_0000002341058466__p16621865118">The following shows how to obtain the worker-0 logs of the training job whose UUID is <strong id="EN-US_TOPIC_0000002341058466__b10627619112">2cd88daa-31a4-40a8-a58f-d186b0e93e4f</strong>.</p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000002341058466__screen2621962117">GET https://endpoint/v2/{project_id}/training-jobs/2cd88daa-31a4-40a8-a58f-d186b0e93e4f/tasks/worker-0/logs/preview</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000002341058466__section18625618111"><h4 class="sectiontitle">Example Responses</h4><p id="EN-US_TOPIC_0000002341058466__p11632621117"><strong id="EN-US_TOPIC_0000002341058466__b14634611119">Status code: 200</strong></p>
|
|
<p id="EN-US_TOPIC_0000002341058466__p6636618119">ok</p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000002341058466__screen12635681115">{
|
|
"content" : "[Modelarts Service Log]collect and upload logs end at 2021-05-18-14:28:13\n[Modelarts Service Log]exiting..:\n [Modelarts Service Log]exiting...\n[Modelarts Service Log]exiting..:\n [Modelarts Service Log]exiting...\n[Modelarts Service Log]exit with :\n [Modelarts Service Log]exit with 0\n[Modelarts Service Log]exit with :\n [Modelarts Service Log]exit with 0\n[ModelArts Service Log][INFO][2021/05/18 14:28:14,207]:\n output-handler finalizing due to: [training finished]\n[ModelArts Service Log][INFO][2021/05/18 14:28:14,207]:\n output-handler finalized\n[Modelarts Service Log][sidecar] exiting at 2021-05-18-14:28:14\n[Modelarts Service Log][sidecar] wait python processes exit..:\n [Modelarts Service Log][sidecar] wait python processes exit...\n[Modelarts Service Log][sidecar] exit with :\n [Modelarts Service Log][sidecar] exit with 0",
|
|
"current_size" : 126548,
|
|
"full_size" : 5242880
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000002341058466__section2064146151115"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002341058466__en-us_topic_0000002091282813_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000002341058466__row18642065115"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="EN-US_TOPIC_0000002341058466__p176518619118">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="EN-US_TOPIC_0000002341058466__p106516121120">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000002341058466__row1464566117"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000002341058466__p96515619114">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="EN-US_TOPIC_0000002341058466__p106517631119">ok</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000002341058466__section46511611112"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0000002341058466__p46506161110">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="algorithms.html">Training Management</a></div>
|
|
</div>
|
|
</div>
|
|
|