Files
doc-exports/docs/modelarts/api-ref/modelarts_03_0073.html
2025-07-28 12:24:54 +00:00

174 lines
14 KiB
HTML

<a name="EN-US_TOPIC_0000002374896733"></a><a name="EN-US_TOPIC_0000002374896733"></a>
<h1 class="topictitle1">Querying Job Engine Specifications</h1>
<div id="body1536923527739"><div class="section" id="EN-US_TOPIC_0000002374896733__section762414021714"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000002374896733__p107017405712">This API is used to obtain the engine type and version of a specified job.</p>
<p id="EN-US_TOPIC_0000002374896733__p96262409173">You must specify the engine specifications when creating a training job or an inference job.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000002374896733__section2612026995423"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0000002374896733__p1590062181912">GET /v1/{project_id}/job/ai-engines</p>
<div class="p" id="EN-US_TOPIC_0000002374896733__p7629171714913"><a href="#EN-US_TOPIC_0000002374896733__table6017292495443">Table 1</a> describes the required parameters.
<div class="tablenoborder"><a name="EN-US_TOPIC_0000002374896733__table6017292495443"></a><a name="table6017292495443"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002374896733__table6017292495443" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000002374896733__row1281400895443"><th align="left" class="cellrowborder" valign="top" width="16.21%" id="mcps1.3.2.3.2.2.5.1.1"><p id="EN-US_TOPIC_0000002374896733__p6412281495455">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.58%" id="mcps1.3.2.3.2.2.5.1.2"><p id="EN-US_TOPIC_0000002374896733__p2656546695455">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="11.700000000000001%" id="mcps1.3.2.3.2.2.5.1.3"><p id="EN-US_TOPIC_0000002374896733__p431917195455">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.510000000000005%" id="mcps1.3.2.3.2.2.5.1.4"><p id="EN-US_TOPIC_0000002374896733__p23681614151847">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000002374896733__row1453354395443"><td class="cellrowborder" valign="top" width="16.21%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000002374896733__p6037999295455">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="15.58%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000002374896733__p5894118795455">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="11.700000000000001%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000002374896733__p950681895455">String</p>
</td>
<td class="cellrowborder" valign="top" width="56.510000000000005%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000002374896733__p3185478295455">Project ID. For details about how to obtain a project ID, see <a href="modelarts_03_0147.html">Obtaining a Project ID and Name</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002374896733__table2918868102420" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000002374896733__row46282814102420"><th align="left" class="cellrowborder" valign="top" width="15.96039603960396%" id="mcps1.3.2.3.3.2.5.1.1"><p id="EN-US_TOPIC_0000002374896733__p58767362102449">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.574257425742575%" id="mcps1.3.2.3.3.2.5.1.2"><p id="EN-US_TOPIC_0000002374896733__p62535864102449">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.049504950495049%" id="mcps1.3.2.3.3.2.5.1.3"><p id="EN-US_TOPIC_0000002374896733__p32240260102449">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.41584158415841%" id="mcps1.3.2.3.3.2.5.1.4"><p id="EN-US_TOPIC_0000002374896733__p144485553408">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000002374896733__row55399715102420"><td class="cellrowborder" valign="top" width="15.96039603960396%" headers="mcps1.3.2.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000002374896733__p9887341993">job_type</p>
</td>
<td class="cellrowborder" valign="top" width="15.574257425742575%" headers="mcps1.3.2.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000002374896733__p1414513610711">No</p>
</td>
<td class="cellrowborder" valign="top" width="12.049504950495049%" headers="mcps1.3.2.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000002374896733__p40637799102449">String</p>
</td>
<td class="cellrowborder" valign="top" width="56.41584158415841%" headers="mcps1.3.2.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000002374896733__p3327413102449">Job type. The value can be <span class="parmvalue" id="EN-US_TOPIC_0000002374896733__parmvalue12237105013511"><b>train</b></span> or <span class="parmvalue" id="EN-US_TOPIC_0000002374896733__parmvalue14242450453"><b>inference</b></span>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000002374896733__section25359586"><h4 class="sectiontitle">Request Body</h4><p id="EN-US_TOPIC_0000002374896733__p67971134191010">None</p>
</div>
<div class="section" id="EN-US_TOPIC_0000002374896733__section26909689"><h4 class="sectiontitle">Response Body</h4><div class="p" id="EN-US_TOPIC_0000002374896733__p139387120137"><a href="#EN-US_TOPIC_0000002374896733__table41713500151328">Table 3</a> describes the response parameters.
<div class="tablenoborder"><a name="EN-US_TOPIC_0000002374896733__table41713500151328"></a><a name="table41713500151328"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002374896733__table41713500151328" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000002374896733__row29711324151328"><th align="left" class="cellrowborder" valign="top" width="16.55%" id="mcps1.3.4.2.2.2.4.1.1"><p id="EN-US_TOPIC_0000002374896733__p40127207151340">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.160000000000002%" id="mcps1.3.4.2.2.2.4.1.2"><p id="EN-US_TOPIC_0000002374896733__p6534128151340">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="68.28999999999999%" id="mcps1.3.4.2.2.2.4.1.3"><p id="EN-US_TOPIC_0000002374896733__p1887216884120">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000002374896733__row8430194841220"><td class="cellrowborder" valign="top" width="16.55%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000002374896733__p2530905217407">is_success</p>
</td>
<td class="cellrowborder" valign="top" width="15.160000000000002%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000002374896733__p2536505617407">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="68.28999999999999%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000002374896733__p4130369517407">Whether the request is successful</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002374896733__row14621155613184"><td class="cellrowborder" valign="top" width="16.55%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000002374896733__p1362145621819">error_message</p>
</td>
<td class="cellrowborder" valign="top" width="15.160000000000002%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000002374896733__p1462165611184">String</p>
</td>
<td class="cellrowborder" valign="top" width="68.28999999999999%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000002374896733__p1648717451920">Error message of a failed API call.</p>
<p id="EN-US_TOPIC_0000002374896733__p154871644191">This parameter is not included when the API call succeeds.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002374896733__row33778427151328"><td class="cellrowborder" valign="top" width="16.55%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000002374896733__p22897743151340">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="15.160000000000002%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000002374896733__p42454511151340">String</p>
</td>
<td class="cellrowborder" valign="top" width="68.28999999999999%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000002374896733__p16263356151340">Error code of a failed API call. For details, see <a href="modelarts_03_0095.html">Error Codes</a>.</p>
<p id="EN-US_TOPIC_0000002374896733__p42263441151340">This parameter is not included when the API call succeeds.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002374896733__row2204993151328"><td class="cellrowborder" valign="top" width="16.55%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000002374896733__p61422889151340">engines</p>
</td>
<td class="cellrowborder" valign="top" width="15.160000000000002%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000002374896733__p6849702151340"><strong id="EN-US_TOPIC_0000002374896733__b18985924274">engines</strong> array</p>
</td>
<td class="cellrowborder" valign="top" width="68.28999999999999%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000002374896733__p17954975151340">List of engine specifications attributes. For details, see <a href="#EN-US_TOPIC_0000002374896733__table21589744151355">Table 4</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000002374896733__table21589744151355"></a><a name="table21589744151355"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002374896733__table21589744151355" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="EN-US_TOPIC_0000002374896733__b191341421111511">engines</strong> parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000002374896733__row51416725151355"><th align="left" class="cellrowborder" valign="top" width="16.79%" id="mcps1.3.4.3.2.4.1.1"><p id="EN-US_TOPIC_0000002374896733__p768308151421">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.160000000000002%" id="mcps1.3.4.3.2.4.1.2"><p id="EN-US_TOPIC_0000002374896733__p62232959151421">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="68.05%" id="mcps1.3.4.3.2.4.1.3"><p id="EN-US_TOPIC_0000002374896733__p9159121112412">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000002374896733__row41135235151355"><td class="cellrowborder" valign="top" width="16.79%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002374896733__p19028196151421">engine_type</p>
</td>
<td class="cellrowborder" valign="top" width="15.160000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002374896733__p64888930151421">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="68.05%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002374896733__p21511952151421">Engine type of a training job</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002374896733__row62760482151355"><td class="cellrowborder" valign="top" width="16.79%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002374896733__p2798668151421">engine_id</p>
</td>
<td class="cellrowborder" valign="top" width="15.160000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002374896733__p25365580151421">Long</p>
</td>
<td class="cellrowborder" valign="top" width="68.05%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002374896733__p41346117151421">ID of the engine selected for a training job</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002374896733__row5169432151355"><td class="cellrowborder" valign="top" width="16.79%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002374896733__p9439438151421">engine_name</p>
</td>
<td class="cellrowborder" valign="top" width="15.160000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002374896733__p26396986151421">String</p>
</td>
<td class="cellrowborder" valign="top" width="68.05%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002374896733__p57781147151421">Name of the engine selected for a training job</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002374896733__row47607587151355"><td class="cellrowborder" valign="top" width="16.79%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002374896733__p45199142151421">engine_version</p>
</td>
<td class="cellrowborder" valign="top" width="15.160000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002374896733__p37251898151421">String</p>
</td>
<td class="cellrowborder" valign="top" width="68.05%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002374896733__p64613725151421">Version of the engine selected for a training job</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000002374896733__section11588124321115"><h4 class="sectiontitle">Sample Request</h4><p id="EN-US_TOPIC_0000002374896733__p323215391124">The following shows how to obtain the engine specifications of a training job.</p>
<div class="p" id="EN-US_TOPIC_0000002374896733__p610253351119"><pre class="screen" id="EN-US_TOPIC_0000002374896733__screen64540414279">GET https://endpoint/v1/{project_id}/job/ai-engines?job_type=train</pre>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000002374896733__section1883454681118"><h4 class="sectiontitle">Sample Response</h4><ul id="EN-US_TOPIC_0000002374896733__ul043041111218"><li id="EN-US_TOPIC_0000002374896733__li164301719122">Successful response<pre class="screen" id="EN-US_TOPIC_0000002374896733__screen3430121131218">{
"is_success": true,
"engines": [
{
"engine_type": 1,
"engine_name": "TensorFlow",
"engine_id": 1,
"engine_version": "TF-1.4.0-python2.7"
}
]
}</pre>
</li><li id="EN-US_TOPIC_0000002374896733__li8431111171211">Failed response<pre class="screen" id="EN-US_TOPIC_0000002374896733__screen15431111181217">{
"is_success": false,
"error_message": "Error string",
"error_code": "ModelArts.0105"
}</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000002374896733__section16342114917109"><h4 class="sectiontitle">Status Code</h4><p id="EN-US_TOPIC_0000002374896733__p471814329176">For details about the status code, see <a href="modelarts_03_0094.html#EN-US_TOPIC_0000002374856625__table1450010510213">Table 1</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>