forked from docs/doc-exports
Reviewed-by: Jiang, Beibei <beibei.jiang@t-systems.com> Reviewed-by: Rechenburg, Matthias <matthias.rechenburg@t-systems.com> Co-authored-by: Lai, Weijian <laiweijian4@huawei.com> Co-committed-by: Lai, Weijian <laiweijian4@huawei.com>
101 lines
11 KiB
HTML
101 lines
11 KiB
HTML
<a name="modelarts_04_0169"></a><a name="modelarts_04_0169"></a>
|
|
|
|
<h1 class="topictitle1">Querying the List of Training Job Versions</h1>
|
|
<div id="body8662426"><div class="section" id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0170904397_section35881040102516"><h4 class="sectiontitle">Sample Code</h4><p id="modelarts_04_0169__en-us_topic_0180515648_p154264844311">In the ModelArts notebook instance, you do not need to enter authentication parameters for session authentication. For details about session authentication of other development environments, see <a href="modelarts_04_0123.html">Session Authentication</a>.</p>
|
|
<div class="codecoloring" codetype="Python" id="modelarts_04_0169__en-us_topic_0180515648_screen1149984511493"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="kn">from</span> <span class="nn">modelarts.session</span> <span class="kn">import</span> <span class="n">Session</span>
|
|
<span class="kn">from</span> <span class="nn">modelarts.estimator</span> <span class="kn">import</span> <span class="n">Estimator</span>
|
|
<span class="n">session</span> <span class="o">=</span> <span class="n">Session</span><span class="p">()</span>
|
|
<span class="n">estimator</span> <span class="o">=</span> <span class="n">Estimator</span><span class="p">(</span><span class="n">session</span><span class="p">,</span> <span class="n">job_id</span><span class="o">=</span><span class="s2">"182626"</span><span class="p">)</span>
|
|
<span class="n">job_version_instance_list</span> <span class="o">=</span> <span class="n">estimator</span><span class="o">.</span><span class="n">get_job_version_object_list</span><span class="p">()</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0170904397_section85751315416"><h4 class="sectiontitle">Parameter Description</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0170904397_table155461191218" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Estimator request parameters</caption><thead align="left"><tr id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0170904397_row254817912212"><th align="left" class="cellrowborder" valign="top" width="22.75%" id="mcps1.3.2.2.2.5.1.1"><p id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0170904397_p12549899214">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="9.879999999999999%" id="mcps1.3.2.2.2.5.1.2"><p id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0170904397_p3552101193813">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.320000000000002%" id="mcps1.3.2.2.2.5.1.3"><p id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0170904397_p1755169172118">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="54.05%" id="mcps1.3.2.2.2.5.1.4"><p id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0170904397_p55521998211">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0170904397_row8893215413"><td class="cellrowborder" valign="top" width="22.75%" headers="mcps1.3.2.2.2.5.1.1 "><p id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0170904397_p6891421842">modelarts_session</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.879999999999999%" headers="mcps1.3.2.2.2.5.1.2 "><p id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0170904397_p68972047">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.320000000000002%" headers="mcps1.3.2.2.2.5.1.3 "><p id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0170904397_p158912219419">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.05%" headers="mcps1.3.2.2.2.5.1.4 "><p id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0170904397_p1689152543">Session object. For details about the initialization method, see <a href="modelarts_04_0123.html">Session Authentication</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0170904397_row197933582219"><td class="cellrowborder" valign="top" width="22.75%" headers="mcps1.3.2.2.2.5.1.1 "><p id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0170904397_p10361105925611">job_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.879999999999999%" headers="mcps1.3.2.2.2.5.1.2 "><p id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0170904397_p196751771039">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.320000000000002%" headers="mcps1.3.2.2.2.5.1.3 "><p id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0170904397_p8675972311">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.05%" headers="mcps1.3.2.2.2.5.1.4 "><p id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0170904397_p212635661310">ID of a training job. You can query <strong id="modelarts_04_0169__en-us_topic_0180515648_b145442291417">job_id</strong> using the training job object generated in <a href="modelarts_04_0131.html">Creating a Training Job</a>, for example, <span class="filepath" id="modelarts_04_0169__en-us_topic_0180515648_filepath354511291348"><b>job_instance.job_id</b></span>, or from the response obtained in <a href="modelarts_04_0160.html">Obtaining Training Jobs</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="modelarts_04_0169__en-us_topic_0180515648_table189155455617" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="modelarts_04_0169__en-us_topic_0180515648_b128103106135">get_job_version_object_list</strong> request parameters</caption><thead align="left"><tr id="modelarts_04_0169__en-us_topic_0180515648_row2092175485620"><th align="left" class="cellrowborder" valign="top" width="22.75%" id="mcps1.3.2.3.2.5.1.1"><p id="modelarts_04_0169__en-us_topic_0180515648_p1492254115617">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="9.879999999999999%" id="mcps1.3.2.3.2.5.1.2"><p id="modelarts_04_0169__en-us_topic_0180515648_p8921154105615">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.320000000000002%" id="mcps1.3.2.3.2.5.1.3"><p id="modelarts_04_0169__en-us_topic_0180515648_p492654115615">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="54.05%" id="mcps1.3.2.3.2.5.1.4"><p id="modelarts_04_0169__en-us_topic_0180515648_p39216547566">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="modelarts_04_0169__en-us_topic_0180515648_row159275485610"><td class="cellrowborder" valign="top" width="22.75%" headers="mcps1.3.2.3.2.5.1.1 "><p id="modelarts_04_0169__en-us_topic_0180515648_p17887193765410">is_show</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.879999999999999%" headers="mcps1.3.2.3.2.5.1.2 "><p id="modelarts_04_0169__en-us_topic_0180515648_p198878374547">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.320000000000002%" headers="mcps1.3.2.3.2.5.1.3 "><p id="modelarts_04_0169__en-us_topic_0180515648_p128873378549">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.05%" headers="mcps1.3.2.3.2.5.1.4 "><p id="modelarts_04_0169__en-us_topic_0180515648_p1388716377547">Whether to print the training job version details. Default value: <span class="parmname" id="modelarts_04_0169__en-us_topic_0180515648_parmname20233657164910"><b>True</b></span></p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="modelarts_04_0169__en-us_topic_0180515648_p148073713367">A training object list is returned in the successful response to <span class="filepath" id="modelarts_04_0169__en-us_topic_0180515648_filepath199131457184011"><b>get_job_version_object_list</b></span>. For details, see <a href="#modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0160436006_table973120224596">Table 3</a>.</p>
|
|
|
|
<div class="tablenoborder"><a name="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0160436006_table973120224596"></a><a name="en-us_topic_0180515648_en-us_topic_0160436006_table973120224596"></a><table cellpadding="4" cellspacing="0" summary="" id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0160436006_table973120224596" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="modelarts_04_0169__en-us_topic_0180515648_b1958244515113">TrainingJob</strong> object description</caption><thead align="left"><tr id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0160436006_row2731522195910"><th align="left" class="cellrowborder" valign="top" width="24.91249124912491%" id="mcps1.3.2.5.2.4.1.1"><p id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0160436006_p57306225598">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.201820182018203%" id="mcps1.3.2.5.2.4.1.2"><p id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0160436006_p117308225593">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="56.885688568856885%" id="mcps1.3.2.5.2.4.1.3"><p id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0160436006_p2730132255915">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0160436006_row1873172215912"><td class="cellrowborder" valign="top" width="24.91249124912491%" headers="mcps1.3.2.5.2.4.1.1 "><p id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0160436006_p4731322145919">TrainingJob</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.201820182018203%" headers="mcps1.3.2.5.2.4.1.2 "><p id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0160436006_p117311922115916">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.885688568856885%" headers="mcps1.3.2.5.2.4.1.3 "><p id="modelarts_04_0169__en-us_topic_0180515648_en-us_topic_0160436006_p6731182225914">Training object. This object contains attributes such as <strong id="modelarts_04_0169__en-us_topic_0180515648_b11325131191513">job_id</strong> and <strong id="modelarts_04_0169__en-us_topic_0180515648_b143251316150">version_id</strong>, and operations on a training job, such as querying, modifying, or deleting the training job. For example, you can use <strong id="modelarts_04_0169__en-us_topic_0180515648_b1832653114153">job_version_instance.job_id</strong> to obtain the ID of a training job.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="modelarts_04_0167.html">Training Job Versions</a></div>
|
|
</div>
|
|
</div>
|
|
|