doc-exports/docs/modelarts/sdk-ref/modelarts_04_0192.html
Lai, Weijian 1ad28cc33e modelarts sdk-ref first version
Reviewed-by: Jiang, Beibei <beibei.jiang@t-systems.com>
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Lai, Weijian <laiweijian4@huawei.com>
Co-committed-by: Lai, Weijian <laiweijian4@huawei.com>
2023-03-01 15:24:28 +00:00

116 lines
11 KiB
HTML

<a name="modelarts_04_0192"></a><a name="modelarts_04_0192"></a>
<h1 class="topictitle1">Querying the List of Engine Types</h1>
<div id="body8662426"><div class="section" id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_section20261580353"><h4 class="sectiontitle">Sample Code</h4><p id="modelarts_04_0192__en-us_topic_0180094061_p186018312478">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_0192__en-us_topic_0180094061_screen980400181116"><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></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">engine_list</span> <span class="o">=</span> <span class="n">Estimator</span><span class="o">.</span><span class="n">get_framework_list</span><span class="p">(</span><span class="n">modelarts_session</span><span class="o">=</span><span class="n">session</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_section163891818441"><h4 class="sectiontitle">Parameter Description</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_table155461191218" frame="border" border="1" rules="all"><caption><b>Table 1 </b><strong id="modelarts_04_0192__en-us_topic_0180094061_b1075210377158">get_framework_list</strong> parameters</caption><thead align="left"><tr id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_row254817912212"><th align="left" class="cellrowborder" valign="top" width="25.629999999999995%" id="mcps1.3.2.2.2.5.1.1"><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p12549899214">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.299999999999999%" id="mcps1.3.2.2.2.5.1.2"><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p3552101193813">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.34%" id="mcps1.3.2.2.2.5.1.3"><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p1755169172118">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43.730000000000004%" id="mcps1.3.2.2.2.5.1.4"><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p55521998211">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_row8893215413"><td class="cellrowborder" valign="top" width="25.629999999999995%" headers="mcps1.3.2.2.2.5.1.1 "><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p6891421842">modelarts_session</p>
</td>
<td class="cellrowborder" valign="top" width="14.299999999999999%" headers="mcps1.3.2.2.2.5.1.2 "><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p68972047">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="16.34%" headers="mcps1.3.2.2.2.5.1.3 "><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p158912219419">Object</p>
</td>
<td class="cellrowborder" valign="top" width="43.730000000000004%" headers="mcps1.3.2.2.2.5.1.4 "><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p1689152543">Session object. For details about the initialization method, see <a href="modelarts_04_0123.html">Session Authentication</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_table973120224596" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Successful response parameters of <strong id="modelarts_04_0192__en-us_topic_0180094061_b17996103171615">get_framework_list</strong></caption><thead align="left"><tr id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_row2731522195910"><th align="left" class="cellrowborder" valign="top" width="32.25%" id="mcps1.3.3.2.3.1.1"><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p117308225593">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="67.75%" id="mcps1.3.3.2.3.1.2"><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p2730132255915">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_row1873172215912"><td class="cellrowborder" valign="top" width="32.25%" headers="mcps1.3.3.2.3.1.1 "><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p117311922115916">List</p>
</td>
<td class="cellrowborder" valign="top" width="67.75%" headers="mcps1.3.3.2.3.1.2 "><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p6731182225914">List of engine flavor attributes. For details, see <a href="#modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_table14718195812596">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_table14718195812596"></a><a name="en-us_topic_0180094061_en-us_topic_0160574647_table14718195812596"></a><table cellpadding="4" cellspacing="0" summary="" id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_table14718195812596" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="modelarts_04_0192__en-us_topic_0180094061_b1396781312248">framework_list</strong> parameters</caption><thead align="left"><tr id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_row2718145875910"><th align="left" class="cellrowborder" valign="top" width="24.91249124912491%" id="mcps1.3.4.2.4.1.1"><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p157181858145918">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.21242124212421%" id="mcps1.3.4.2.4.1.2"><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p18718115818590">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.87508750875088%" id="mcps1.3.4.2.4.1.3"><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p871812589593">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_row137184589592"><td class="cellrowborder" valign="top" width="24.91249124912491%" headers="mcps1.3.4.2.4.1.1 "><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p371865812596">framework_type</p>
</td>
<td class="cellrowborder" valign="top" width="24.21242124212421%" headers="mcps1.3.4.2.4.1.2 "><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p771820588593">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.87508750875088%" headers="mcps1.3.4.2.4.1.3 "><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p171835818594">Engine type</p>
</td>
</tr>
<tr id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_row77185589591"><td class="cellrowborder" valign="top" width="24.91249124912491%" headers="mcps1.3.4.2.4.1.1 "><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p6718195835910">framework_version</p>
</td>
<td class="cellrowborder" valign="top" width="24.21242124212421%" headers="mcps1.3.4.2.4.1.2 "><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p271855811595">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.87508750875088%" headers="mcps1.3.4.2.4.1.3 "><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p7718558105914">Engine version</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_table55928961173927" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Failed response parameters</caption><thead align="left"><tr id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_row40618446173927"><th align="left" class="cellrowborder" valign="top" width="25.490000000000002%" id="mcps1.3.5.2.4.1.1"><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p1631242217407">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23.72%" id="mcps1.3.5.2.4.1.2"><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p5427574117407">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.79%" id="mcps1.3.5.2.4.1.3"><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p12364118914">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_row11062410173927"><td class="cellrowborder" valign="top" width="25.490000000000002%" headers="mcps1.3.5.2.4.1.1 "><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p688954611624">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="23.72%" headers="mcps1.3.5.2.4.1.2 "><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p3804851211624">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.79%" headers="mcps1.3.5.2.4.1.3 "><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p156551524172412">Error code when the API call fails.</p>
<p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p6203060911624">This parameter is not included when the API call succeeds.</p>
</td>
</tr>
<tr id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_row52351653173927"><td class="cellrowborder" valign="top" width="25.490000000000002%" headers="mcps1.3.5.2.4.1.1 "><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p4368550411624">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="23.72%" headers="mcps1.3.5.2.4.1.2 "><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p6574380911624">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.79%" headers="mcps1.3.5.2.4.1.3 "><p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p1277593619">Error message when the API call fails.</p>
<p id="modelarts_04_0192__en-us_topic_0180094061_en-us_topic_0160574647_p2364831411624">This parameter is not included when the API call succeeds.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="modelarts_04_0189.html">Resource and Engine Specifications</a></div>
</div>
</div>