doc-exports/docs/modelarts/sdk-ref/modelarts_04_0179.html
Lai, Weijian eda19245f1 modelarts sdk-ref version 21.430 update
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>
2023-03-20 09:32:27 +00:00

104 lines
11 KiB
HTML

<a name="modelarts_04_0179"></a><a name="modelarts_04_0179"></a>
<h1 class="topictitle1">Deleting a Training Job Configuration</h1>
<div id="body8662426"><div class="section" id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_section35881040102516"><h4 class="sectiontitle">Sample Code</h4><p id="modelarts_04_0179__en-us_topic_0180094071_p586796164511">In ModelArts notebook, 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>
<ul id="modelarts_04_0179__en-us_topic_0180094071_ul1033193214218"><li id="modelarts_04_0179__en-us_topic_0180094071_li1833114320210">Method 1: Delete a training job parameter configuration based on the specified <strong id="modelarts_04_0179__en-us_topic_0180094071_b6228152819422">config_name</strong>.<div class="codecoloring" codetype="Python" id="modelarts_04_0179__en-us_topic_0180094071_screen364012409216"><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">modelarts_session</span><span class="o">=</span><span class="n">session</span><span class="p">,</span> <span class="n">config_name</span><span class="o">=</span><span class="s2">&quot;my_job_config&quot;</span><span class="p">)</span>
<span class="n">status</span> <span class="o">=</span> <span class="n">estimator</span><span class="o">.</span><span class="n">delete_job_configs</span><span class="p">()</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
<ul id="modelarts_04_0179__en-us_topic_0180094071_ul16397123520213"><li id="modelarts_04_0179__en-us_topic_0180094071_li43973351425">Method 2: Delete the training job parameter configuration created in <a href="modelarts_04_0174.html">Creating a Training Job Configuration</a>.<div class="codecoloring" codetype="Python" id="modelarts_04_0179__en-us_topic_0180094071_screen1248215503214"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">status</span> <span class="o">=</span> <span class="n">job_config_instance</span><span class="o">.</span><span class="n">delete_job_configs</span><span class="p">()</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
<ul id="modelarts_04_0179__en-us_topic_0180094071_ul77268371423"><li id="modelarts_04_0179__en-us_topic_0180094071_li87269370211">Method 3: Delete the training job parameter configuration object returned in <a href="modelarts_04_0175.html">Querying the List of Training Job Parameter Configuration Objects</a>.<div class="codecoloring" codetype="Python" id="modelarts_04_0179__en-us_topic_0180094071_screen43861592218"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">status</span> <span class="o">=</span> <span class="n">job_config_instance_list</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">delete_job_configs</span><span class="p">()</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
</div>
<div class="section" id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_section0599140112517"><h4 class="sectiontitle">Parameter Description</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_table155461191218" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Estimator request parameters</caption><thead align="left"><tr id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_row254817912212"><th align="left" class="cellrowborder" valign="top" width="19.191919191919194%" id="mcps1.3.2.2.2.5.1.1"><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p12549899214">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.141414141414144%" id="mcps1.3.2.2.2.5.1.2"><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p3552101193813">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.121212121212121%" id="mcps1.3.2.2.2.5.1.3"><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p1755169172118">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="54.545454545454554%" id="mcps1.3.2.2.2.5.1.4"><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p55521998211">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_row8893215413"><td class="cellrowborder" valign="top" width="19.191919191919194%" headers="mcps1.3.2.2.2.5.1.1 "><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p6891421842">modelarts_session</p>
</td>
<td class="cellrowborder" valign="top" width="14.141414141414144%" headers="mcps1.3.2.2.2.5.1.2 "><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p68972047">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="12.121212121212121%" headers="mcps1.3.2.2.2.5.1.3 "><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p158912219419">Object</p>
</td>
<td class="cellrowborder" valign="top" width="54.545454545454554%" headers="mcps1.3.2.2.2.5.1.4 "><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_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_0179__en-us_topic_0180094071_en-us_topic_0170904404_row197933582219"><td class="cellrowborder" valign="top" width="19.191919191919194%" headers="mcps1.3.2.2.2.5.1.1 "><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p9118145011917">config_name</p>
</td>
<td class="cellrowborder" valign="top" width="14.141414141414144%" headers="mcps1.3.2.2.2.5.1.2 "><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p196751771039">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="12.121212121212121%" headers="mcps1.3.2.2.2.5.1.3 "><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p8675972311">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.545454545454554%" headers="mcps1.3.2.2.2.5.1.4 "><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p212635661310">Name of a training job parameter configuration</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_table1110417144251" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="modelarts_04_0179__en-us_topic_0180094071_b17881154404317">delete_job_configs</strong> response parameters</caption><thead align="left"><tr id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_row151628148254"><th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.2.3.2.4.1.1"><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p91627143253">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.3.2.3.2.4.1.2"><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p12162201492513">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="67%" id="mcps1.3.2.3.2.4.1.3"><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p101626146259">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_row7162141492518"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.3.2.4.1.1 "><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p816331492519">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.3.2.4.1.2 "><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p17163914112519">String</p>
</td>
<td class="cellrowborder" valign="top" width="67%" headers="mcps1.3.2.3.2.4.1.3 "><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p125241471184">Error message when the API call fails.</p>
<p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p13163214172510">This parameter is not included when the API call succeeds.</p>
</td>
</tr>
<tr id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_row7163171419252"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.3.2.4.1.1 "><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p101631142254">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.3.2.4.1.2 "><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p15163151416254">String</p>
</td>
<td class="cellrowborder" valign="top" width="67%" headers="mcps1.3.2.3.2.4.1.3 "><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p21827359170">Error code when the API fails to be called. For details, see <a href="https://docs.otc.t-systems.com/modelarts/api-ref/common_parameters/error_codes.html" target="_blank" rel="noopener noreferrer">Error Codes</a> in <em id="modelarts_04_0179__i19608117193012">ModelArts API Reference</em>.</p>
<p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p2016319141253">This parameter is not included when the API call succeeds.</p>
</td>
</tr>
<tr id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_row15821153459"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.3.2.4.1.1 "><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p14583105318514">is_success</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.3.2.4.1.2 "><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p165835534517">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="67%" headers="mcps1.3.2.3.2.4.1.3 "><p id="modelarts_04_0179__en-us_topic_0180094071_en-us_topic_0170904404_p14433359122514">Whether the API call succeeds</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="modelarts_04_0173.html">Training Job Parameter Configuration</a></div>
</div>
</div>