doc-exports/docs/modelarts/api-ref/modelarts_03_0072.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

271 lines
23 KiB
HTML

<a name="modelarts_03_0072"></a><a name="modelarts_03_0072"></a>
<h1 class="topictitle1">Querying Job Resource Specifications</h1>
<div id="body8662426"><div class="section" id="modelarts_03_0072__en-us_topic_0131307647_section34424648"><h4 class="sectiontitle">Function</h4><p id="modelarts_03_0072__en-us_topic_0131307647_p11626845133420">This API is used to query the resource specifications of a specified job.</p>
<p id="modelarts_03_0072__en-us_topic_0131307647_p53495536">You must specify the resource specifications when creating a training job or an inference job.</p>
</div>
<div class="section" id="modelarts_03_0072__en-us_topic_0131307647_section41386382"><h4 class="sectiontitle">URI</h4><p id="modelarts_03_0072__en-us_topic_0131307647_p1823155471512">GET /v1/{project_id}/job/resource-specs</p>
<div class="p" id="modelarts_03_0072__en-us_topic_0131307647_p20611155111341"><a href="#modelarts_03_0072__en-us_topic_0131307647_table5822680595335">Table 1</a> describes the required parameters.
<div class="tablenoborder"><a name="modelarts_03_0072__en-us_topic_0131307647_table5822680595335"></a><a name="en-us_topic_0131307647_table5822680595335"></a><table cellpadding="4" cellspacing="0" summary="" id="modelarts_03_0072__en-us_topic_0131307647_table5822680595335" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters</caption><thead align="left"><tr id="modelarts_03_0072__en-us_topic_0131307647_row897995095335"><th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.2.3.2.2.5.1.1"><p id="modelarts_03_0072__en-us_topic_0131307647_p1836696595350">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.2.3.2.2.5.1.2"><p id="modelarts_03_0072__en-us_topic_0131307647_p1132916395350">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12%" id="mcps1.3.2.3.2.2.5.1.3"><p id="modelarts_03_0072__en-us_topic_0131307647_p4524701095350">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53%" id="mcps1.3.2.3.2.2.5.1.4"><p id="modelarts_03_0072__en-us_topic_0131307647_p23681614151847">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="modelarts_03_0072__en-us_topic_0131307647_row3219318495335"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p384588295350">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p4308099595350">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p6700853295350">String</p>
</td>
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="modelarts_03_0072__en-us_topic_0131307647_p5898200695350">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>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="modelarts_03_0072__en-us_topic_0131307647_table2918868102420" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters</caption><thead align="left"><tr id="modelarts_03_0072__en-us_topic_0131307647_row46282814102420"><th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.2.3.3.2.5.1.1"><p id="modelarts_03_0072__en-us_topic_0131307647_p58767362102449">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.2.3.3.2.5.1.2"><p id="modelarts_03_0072__en-us_topic_0131307647_p62535864102449">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12%" id="mcps1.3.2.3.3.2.5.1.3"><p id="modelarts_03_0072__en-us_topic_0131307647_p32240260102449">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53%" id="mcps1.3.2.3.3.2.5.1.4"><p id="modelarts_03_0072__en-us_topic_0131307647_p05741440402">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="modelarts_03_0072__en-us_topic_0131307647_row55399715102420"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.3.3.2.5.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p533920010715">job_type</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.3.3.2.5.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p1414513610711">No</p>
</td>
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.2.3.3.2.5.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p40637799102449">String</p>
</td>
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.2.3.3.2.5.1.4 "><p id="modelarts_03_0072__en-us_topic_0131307647_p3327413102449">Job type. The value can be <span class="parmvalue" id="modelarts_03_0072__en-us_topic_0131307647_parmvalue794651316511"><b>train</b></span> or <span class="parmvalue" id="modelarts_03_0072__en-us_topic_0131307647_parmvalue19518131255"><b>inference</b></span>. This parameter is not required for querying the specifications of ExeML resources.</p>
</td>
</tr>
<tr id="modelarts_03_0072__en-us_topic_0131307647_row1614381011414"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.3.3.2.5.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p1114521081410">engine_id</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.3.3.2.5.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p2113111021612">No</p>
</td>
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.2.3.3.2.5.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p814621061417">Long</p>
</td>
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.2.3.3.2.5.1.4 "><p id="modelarts_03_0072__en-us_topic_0131307647_p1146210131415">Engine ID of a job. Default value: <span class="parmvalue" id="modelarts_03_0072__en-us_topic_0131307647_parmvalue9414230171315"><b>0</b></span> This parameter is not required for querying the specifications of ExeML resources.</p>
</td>
</tr>
<tr id="modelarts_03_0072__en-us_topic_0131307647_row73168211233"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.3.3.2.5.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p63189272315">project_type</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.3.3.2.5.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p163181219237">No</p>
</td>
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.2.3.3.2.5.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p031822142319">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.2.3.3.2.5.1.4 "><p id="modelarts_03_0072__en-us_topic_0131307647_p11523162261614">Project type. Default value: <span class="parmvalue" id="modelarts_03_0072__en-us_topic_0131307647_parmvalue68544011131"><b>0</b></span></p>
<ul id="modelarts_03_0072__en-us_topic_0131307647_ul56691845161618"><li id="modelarts_03_0072__en-us_topic_0131307647_li1669134519166"><span class="parmvalue" id="modelarts_03_0072__en-us_topic_0131307647_parmvalue151891519131"><b>0</b></span>: non-ExeML project</li><li id="modelarts_03_0072__en-us_topic_0131307647_li0782191131717"><span class="parmvalue" id="modelarts_03_0072__en-us_topic_0131307647_parmvalue4113556111317"><b>1</b></span>: ExeML job for image classification</li><li id="modelarts_03_0072__en-us_topic_0131307647_li7592112518171"><span class="parmvalue" id="modelarts_03_0072__en-us_topic_0131307647_parmvalue182001359101315"><b>2</b></span>: ExeML job for object detection</li><li id="modelarts_03_0072__en-us_topic_0131307647_li5781124812166"><span class="parmvalue" id="modelarts_03_0072__en-us_topic_0131307647_parmvalue535269111417"><b>3</b></span>: ExeML job for predictive analytics</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="modelarts_03_0072__en-us_topic_0131307647_section63962679"><h4 class="sectiontitle">Request Body</h4><p id="modelarts_03_0072__en-us_topic_0131307647_p19282124718373">None</p>
</div>
<div class="section" id="modelarts_03_0072__en-us_topic_0131307647_section38793204"><h4 class="sectiontitle">Response Body</h4><div class="p" id="modelarts_03_0072__en-us_topic_0131307647_p1576551314393"><a href="#modelarts_03_0072__en-us_topic_0131307647_table1817887315129">Table 3</a> describes the response parameters.
<div class="tablenoborder"><a name="modelarts_03_0072__en-us_topic_0131307647_table1817887315129"></a><a name="en-us_topic_0131307647_table1817887315129"></a><table cellpadding="4" cellspacing="0" summary="" id="modelarts_03_0072__en-us_topic_0131307647_table1817887315129" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameters</caption><thead align="left"><tr id="modelarts_03_0072__en-us_topic_0131307647_row5217905515129"><th align="left" class="cellrowborder" valign="top" width="18%" id="mcps1.3.4.2.2.2.4.1.1"><p id="modelarts_03_0072__en-us_topic_0131307647_p65954056151223">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.4.2.2.2.4.1.2"><p id="modelarts_03_0072__en-us_topic_0131307647_p6611585151223">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="63%" id="mcps1.3.4.2.2.2.4.1.3"><p id="modelarts_03_0072__en-us_topic_0131307647_p39211947114013">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="modelarts_03_0072__en-us_topic_0131307647_row1842568384"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p2530905217407">is_success</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p2536505617407">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="63%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p4130369517407">Whether the request is successful</p>
</td>
</tr>
<tr id="modelarts_03_0072__en-us_topic_0131307647_row1160975318137"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p9611135361312">error_message</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p2611155341317">String</p>
</td>
<td class="cellrowborder" valign="top" width="63%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p870773161410">Error message of a failed API call.</p>
<p id="modelarts_03_0072__en-us_topic_0131307647_p6710113111413">This parameter is not included when the API call succeeds.</p>
</td>
</tr>
<tr id="modelarts_03_0072__en-us_topic_0131307647_row3401923515129"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p36319657151223">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p56806285151223">String</p>
</td>
<td class="cellrowborder" valign="top" width="63%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p16691131714118">Error code of a failed API call. For details, see <a href="modelarts_03_0095.html">Error Codes</a>.</p>
<p id="modelarts_03_0072__en-us_topic_0131307647_p37906366151223">This parameter is not included when the API call succeeds.</p>
</td>
</tr>
<tr id="modelarts_03_0072__en-us_topic_0131307647_row50513215129"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p27825429151223">spec_total_count</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p26535650151223">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="63%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p1904021151223">Total number of job resource specifications</p>
</td>
</tr>
<tr id="modelarts_03_0072__en-us_topic_0131307647_row774797715129"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p45854132151223">specs</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p67037767151223"><strong id="modelarts_03_0072__en-us_topic_0131307647_b741095072419">specs</strong> array</p>
</td>
<td class="cellrowborder" valign="top" width="63%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p61350067151223">List of resource specifications attributes. For details, see <a href="#modelarts_03_0072__en-us_topic_0131307647_table20408880151239">Table 4</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tablenoborder"><a name="modelarts_03_0072__en-us_topic_0131307647_table20408880151239"></a><a name="en-us_topic_0131307647_table20408880151239"></a><table cellpadding="4" cellspacing="0" summary="" id="modelarts_03_0072__en-us_topic_0131307647_table20408880151239" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="modelarts_03_0072__en-us_topic_0131307647_b1535671341519">specs</strong> parameters</caption><thead align="left"><tr id="modelarts_03_0072__en-us_topic_0131307647_row34638099151239"><th align="left" class="cellrowborder" valign="top" width="18%" id="mcps1.3.4.3.2.4.1.1"><p id="modelarts_03_0072__en-us_topic_0131307647_p5292524615136">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.3.4.3.2.4.1.2"><p id="modelarts_03_0072__en-us_topic_0131307647_p5908657015136">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="68%" id="mcps1.3.4.3.2.4.1.3"><p id="modelarts_03_0072__en-us_topic_0131307647_p117085012401">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="modelarts_03_0072__en-us_topic_0131307647_row50569044151239"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.3.2.4.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p5023512615136">spec_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p4251341115136">Long</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.2.4.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p2103428515136">ID of the resource specifications</p>
</td>
</tr>
<tr id="modelarts_03_0072__en-us_topic_0131307647_row26145567151239"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.3.2.4.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p3317304715136">core</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p266231115136">String</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.2.4.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p1432065615136">Number of cores of the resource specifications</p>
</td>
</tr>
<tr id="modelarts_03_0072__en-us_topic_0131307647_row30806096151239"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.3.2.4.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p3788438515136">cpu</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p4873631715136">String</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.2.4.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p5532763015136">CPU memory of the resource specifications</p>
</td>
</tr>
<tr id="modelarts_03_0072__en-us_topic_0131307647_row46564525151239"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.3.2.4.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p141571315136">gpu_num</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p4756394115136">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.2.4.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p2747397615136">Number of GPUs of the resource specifications</p>
</td>
</tr>
<tr id="modelarts_03_0072__en-us_topic_0131307647_row10645573151239"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.3.2.4.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p3008772815136">gpu_type</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p2118688415136">String</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.2.4.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p3841603715136">GPU type of the resource specifications</p>
</td>
</tr>
<tr id="modelarts_03_0072__en-us_topic_0131307647_row5353263151239"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.3.2.4.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p2089473115136">spec_code</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p1475169015136">String</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.2.4.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p5403627415136">Type of the resource specifications</p>
</td>
</tr>
<tr id="modelarts_03_0072__en-us_topic_0131307647_row44946762151239"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.3.2.4.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p6664965915136">max_num</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p2991332715136">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.2.4.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p706042315136">Maximum number of nodes that can be selected</p>
</td>
</tr>
<tr id="modelarts_03_0072__en-us_topic_0131307647_row17895142932714"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.3.2.4.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p1889515294275">unit_num</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p889512914277">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.2.4.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p1889522917279">Number of pricing units</p>
</td>
</tr>
<tr id="modelarts_03_0072__en-us_topic_0131307647_row114950418149"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.3.2.4.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p1349711411147">storage</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p194979410146">String</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.2.4.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p191701723143315">SSD size of a resource flavor</p>
</td>
</tr>
<tr id="modelarts_03_0072__en-us_topic_0131307647_row146412412146"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.3.2.4.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p1164114417141">interface_type</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p064164171413">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.2.4.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p3641184114149">Interface type</p>
</td>
</tr>
<tr id="modelarts_03_0072__en-us_topic_0131307647_row77817418142"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.3.2.4.1.1 "><p id="modelarts_03_0072__en-us_topic_0131307647_p18781124117148">no_resource</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="modelarts_03_0072__en-us_topic_0131307647_p14781104118141">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.3.4.3.2.4.1.3 "><p id="modelarts_03_0072__en-us_topic_0131307647_p1278194151412">Whether the resources of the selected specifications are sufficient. True indicates that no resource is available.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="modelarts_03_0072__en-us_topic_0131307647_section136871714386"><h4 class="sectiontitle">Samples</h4><p id="modelarts_03_0072__en-us_topic_0131307647_p172337271555">The following shows how to query the resource specifications of a training job.</p>
<ul id="modelarts_03_0072__en-us_topic_0131307647_ul19646230"><li id="modelarts_03_0072__en-us_topic_0131307647_li42598346">Sample request<pre class="screen" id="modelarts_03_0072__en-us_topic_0131307647_screen1759710185185">GET https://endpoint/v1/{project_id}/job/resource-specs?job_type=train</pre>
</li></ul>
<ul id="modelarts_03_0072__en-us_topic_0131307647_ul158982823912"><li id="modelarts_03_0072__en-us_topic_0131307647_li46439960">Successful sample response<pre class="screen" id="modelarts_03_0072__en-us_topic_0131307647_screen8107827181819">{
"specs": [
{
"spec_id": 2,
"core": "2",
"cpu": "8",
"gpu_num": 0,
"gpu_type": "",
"spec_code": "modelarts.vm.cpu.2u",
"unit_num": 1,
"max_num": 2,
"storage": "",
"interface_type": 1,
"no_resource": false
},
{
"spec_id": 4,
"core": "8",
"cpu": "64",
"gpu_num": 1,
"gpu_type": "v100",
"spec_code":"modelarts.vm.gpu.v100",
"unit_num": 1,
"max_num": 4,
"storage": "",
"interface_type": 1,
"no_resource": false
}
],
"is_success": true,
"spec_total_count": 2
}</pre>
</li><li id="modelarts_03_0072__en-us_topic_0131307647_li1521123202912">Failed sample response<pre class="screen" id="modelarts_03_0072__en-us_topic_0131307647_screen1337234510183">{
"is_success": false,
"error_message": "Error string",
"error_code": "ModelArts.0105"
}</pre>
</li></ul>
</div>
<div class="section" id="modelarts_03_0072__en-us_topic_0131307647_section16342114917109"><h4 class="sectiontitle">Status Code</h4><p id="modelarts_03_0072__en-us_topic_0131307647_p1731954913014">For details about the status code, see <a href="modelarts_03_0094.html#modelarts_03_0094__en-us_topic_0132773864_table1450010510213">Table 1</a>.</p>
</div>
<div class="section" id="modelarts_03_0072__section27281325181210"><h4 class="sectiontitle">Error Codes</h4><p id="modelarts_03_0072__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_0071.html">Resource and Engine Specifications</a></div>
</div>
</div>