forked from docs/doc-exports
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>
101 lines
19 KiB
HTML
101 lines
19 KiB
HTML
<a name="EN-US_TOPIC_0000001943974089"></a><a name="EN-US_TOPIC_0000001943974089"></a>
|
|
|
|
<h1 class="topictitle1">Importing a Meta Model from OBS</h1>
|
|
<div id="body0000001164998746"><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p3439154141914">If a model is developed and trained using a mainstream AI engine, import the model to ModelArts and use the model to create an AI application. In this way, the AI applications can be centrally managed on ModelArts.</p>
|
|
<div class="section" id="EN-US_TOPIC_0000001943974089__section66265835412"><h4 class="sectiontitle">Constraints</h4><ul id="EN-US_TOPIC_0000001943974089__ul19815145117555"><li id="EN-US_TOPIC_0000001943974089__li1284811527556">The imported model for creating an AI application, inference code, and configuration file must comply with the requirements of ModelArts. For details, see <a href="inference-modelarts-0055.html">Introduction</a>, <a href="inference-modelarts-0056.html">Specifications for Editing a Model Configuration File</a>, and <a href="inference-modelarts-0057.html">Specifications for Writing Model Inference Code</a>.</li><li id="EN-US_TOPIC_0000001943974089__li69538818568">ModelArts of the Arm architecture does not support model import from OBS.</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001943974089__section20361178552"><h4 class="sectiontitle">Prerequisites</h4><ul id="EN-US_TOPIC_0000001943974089__ul1711311467559"><li id="EN-US_TOPIC_0000001943974089__li131131446185515">The model has been developed and trained, and the type and version of the AI engine used by the model are supported by ModelArts. For details, see <a href="inference-modelarts-0003.html#EN-US_TOPIC_0000001943974209__en-us_topic_0171858287_section04192617912">Supported AI Engines for ModelArts Inference</a>.</li><li id="EN-US_TOPIC_0000001943974089__li31840119561">The trained model package, inference code, and configuration file have been uploaded to OBS.</li><li id="EN-US_TOPIC_0000001943974089__li171851913566">The OBS directory you use and ModelArts are in the same region.</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_section118927471271"><h4 class="sectiontitle">Creating an AI Application</h4><ol id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_ol361819292368"><li id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_li1580718447312">Log in to the ModelArts console, and choose <strong id="EN-US_TOPIC_0000001943974089__b132881233204718">AI Application Management</strong> > <strong id="EN-US_TOPIC_0000001943974089__b14288833124716">AI Applications</strong> from the navigation pane. The <strong id="EN-US_TOPIC_0000001943974089__b229383374718">AI Applications</strong> page is displayed.</li><li id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_li861952913360">Click <strong id="EN-US_TOPIC_0000001943974089__b162959562473">Create</strong> in the upper left corner.</li><li id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_li2619629133610">On the displayed page, configure parameters.<ol type="a" id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_ol78982017184013"><li id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_li1883720166406">Enter basic information about the AI application. For details, see <a href="#EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_table19428112584211">Table 1</a>.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_table19428112584211"></a><a name="en-us_topic_0207629478_table19428112584211"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_table19428112584211" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Basic information</caption><thead align="left"><tr id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_row2042972515427"><th align="left" class="cellrowborder" valign="top" width="18.91%" id="mcps1.3.4.2.3.1.1.2.2.3.1.1"><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p18429225134213">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="81.08999999999999%" id="mcps1.3.4.2.3.1.1.2.2.3.1.2"><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p1742912544217">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_row164292250428"><td class="cellrowborder" valign="top" width="18.91%" headers="mcps1.3.4.2.3.1.1.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p1842982518421">Name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="81.08999999999999%" headers="mcps1.3.4.2.3.1.1.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p10429132534219">Name of the AI application. The value can contain 1 to 64 visible characters. Only letters, digits, hyphens (-), and underscores (_) are allowed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_row5429112564217"><td class="cellrowborder" valign="top" width="18.91%" headers="mcps1.3.4.2.3.1.1.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p14298255423">Version</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="81.08999999999999%" headers="mcps1.3.4.2.3.1.1.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p11429125104218">Version of the AI application. The default value is <strong id="EN-US_TOPIC_0000001943974089__b090918207545">0.0.1</strong> for the first import.</p>
|
|
<div class="note" id="EN-US_TOPIC_0000001943974089__note1372704231920"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0000001402159240_p98891822113312">After an AI application is created, you can <a href="inference-modelarts-0013.html#EN-US_TOPIC_0000001910054874__en-us_topic_0171858290_section102881451161111">create new versions</a> using different meta models for optimization.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_row18429132512429"><td class="cellrowborder" valign="top" width="18.91%" headers="mcps1.3.4.2.3.1.1.2.2.3.1.1 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p24294259424">Description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="81.08999999999999%" headers="mcps1.3.4.2.3.1.1.2.2.3.1.2 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p1042942514210">Brief description of the AI application.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_li940110124413">Select the meta model source and configure related parameters. Set <strong id="EN-US_TOPIC_0000001943974089__b118171627145716">Meta Model Source</strong> to <strong id="EN-US_TOPIC_0000001943974089__b78173275575">OBS</strong>. For details about the parameters, see <a href="#EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_table1631162916535">Table 2</a>.<p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p14182153016533">To import a meta model from OBS, edit the inference code and configuration file by following <a href="inference-modelarts-0055.html">model package specifications</a> and place the inference code and configuration file in the <strong id="EN-US_TOPIC_0000001943974089__b48209875814">model</strong> folder storing the meta model. If the selected directory does not comply with the model package specifications, the AI application cannot be created.</p>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_table1631162916535"></a><a name="en-us_topic_0207629478_table1631162916535"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_table1631162916535" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Meta model source parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_row362872915531"><th align="left" class="cellrowborder" valign="top" width="18.57%" id="mcps1.3.4.2.3.1.2.5.2.3.1.1"><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p6628132913538">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="81.43%" id="mcps1.3.4.2.3.1.2.5.2.3.1.2"><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p6628132985312">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_row862812294533"><td class="cellrowborder" valign="top" width="18.57%" headers="mcps1.3.4.2.3.1.2.5.2.3.1.1 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p96281229195315">Meta Model</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="81.43%" headers="mcps1.3.4.2.3.1.2.5.2.3.1.2 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p196286292531">OBS path for storing the meta model.</p>
|
|
<p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p15634813122819">The OBS path cannot contain spaces. Otherwise, the creation of the AI application will fail.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_row1262920291539"><td class="cellrowborder" valign="top" width="18.57%" headers="mcps1.3.4.2.3.1.2.5.2.3.1.1 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p4629129145315">AI Engine</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="81.43%" headers="mcps1.3.4.2.3.1.2.5.2.3.1.2 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p17629172914537">AI engine, which is automatically set according to the model storage path you select, used by the meta model.</p>
|
|
<p id="EN-US_TOPIC_0000001943974089__p675343414380">If the <strong id="EN-US_TOPIC_0000001943974089__b772112120712">AI Engine</strong> is <strong id="EN-US_TOPIC_0000001943974089__b4721811779">Custom</strong>, configure the following parameters:</p>
|
|
<ul id="EN-US_TOPIC_0000001943974089__ul189168573404"><li id="EN-US_TOPIC_0000001943974089__li10916105784016"><strong id="EN-US_TOPIC_0000001943974089__b1834253818">Container API</strong>: Protocol and port number for starting the model. The default request protocol and port number are <strong id="EN-US_TOPIC_0000001943974089__b43611222081">HTTPS</strong> and <strong id="EN-US_TOPIC_0000001943974089__b1936214221282">8080</strong>, respectively.</li><li id="EN-US_TOPIC_0000001943974089__li119741017417"><strong id="EN-US_TOPIC_0000001943974089__b2039173413912">Health Check</strong>: Health check on the model. This parameter is configurable only when the health check API is configured in the custom image. Otherwise, the AI application deployment will fail.<ul id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629477_ul15674135162120"><li id="EN-US_TOPIC_0000001943974089__en-us_topic_0000001402159240_li14321058289"><strong id="EN-US_TOPIC_0000001943974089__b52621521141916">Check Mode</strong>: Select <strong id="EN-US_TOPIC_0000001943974089__b152631321191910">HTTP request</strong> or <strong id="EN-US_TOPIC_0000001943974089__b72631121151914">Command</strong>.</li><li id="EN-US_TOPIC_0000001943974089__en-us_topic_0000001402159240_en-us_topic_0207629477_li19457185117568"><strong id="EN-US_TOPIC_0000001943974089__b622664210196">Health Check URL</strong>: Enter the health check URL, which defaults to <strong id="EN-US_TOPIC_0000001943974089__b10226742141913">/health</strong>. This parameter is displayed when <strong id="EN-US_TOPIC_0000001943974089__b1222664212191">Check Mode</strong> is set to <strong id="EN-US_TOPIC_0000001943974089__b4226042111915">HTTP request</strong>. </li><li id="EN-US_TOPIC_0000001943974089__en-us_topic_0000001402159240_li13211958175310"><strong id="EN-US_TOPIC_0000001943974089__b8654153792013">Health Check Command</strong>: Enter the health check command. This parameter is displayed when <strong id="EN-US_TOPIC_0000001943974089__b126541137152018">Check Mode</strong> is set to <strong id="EN-US_TOPIC_0000001943974089__b66551437112019">Command</strong>.</li><li id="EN-US_TOPIC_0000001943974089__en-us_topic_0000001402159240_en-us_topic_0207629477_li1224565520377"><strong id="EN-US_TOPIC_0000001943974089__b15542254182016">Health Check Period</strong>: Enter an integer ranging from 1 to 2147483647. The unit is second. The default value is <strong id="EN-US_TOPIC_0000001943974089__b1011316547235">5</strong>.</li><li id="EN-US_TOPIC_0000001943974089__en-us_topic_0000001402159240_li112031555105911"><strong id="EN-US_TOPIC_0000001943974089__b1645173816241">Delay</strong>: Set a delay for the health check to occur after the instance has started. Enter an integer ranging from 0 to 2147483647. The unit is second. The default value is <strong id="EN-US_TOPIC_0000001943974089__b938211183311">12</strong>.</li><li id="EN-US_TOPIC_0000001943974089__en-us_topic_0000001402159240_en-us_topic_0207629477_li156741651172112"><strong id="EN-US_TOPIC_0000001943974089__b4681115112334">Maximum Failures</strong>: Enter an integer ranging from 1 to 2147483647. If the service fails the specified number of consecutive health checks during startup, it will enter the abnormal state. If the service fails the specified number of consecutive health checks during operation, it will enter the alarm state. The default value is <strong id="EN-US_TOPIC_0000001943974089__b11286155119337">12</strong>.</li></ul>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_row104901136453"><td class="cellrowborder" valign="top" width="18.57%" headers="mcps1.3.4.2.3.1.2.5.2.3.1.1 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p9519122014453">Runtime Dependency</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="81.43%" headers="mcps1.3.4.2.3.1.2.5.2.3.1.2 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p1451914207458">Dependencies that the selected model has on the environment. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_row0629229135315"><td class="cellrowborder" valign="top" width="18.57%" headers="mcps1.3.4.2.3.1.2.5.2.3.1.1 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p131681738164517">AI Application Description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="81.43%" headers="mcps1.3.4.2.3.1.2.5.2.3.1.2 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p116719389455">AI application descriptions to help other developers better understand and use your application. Click <span class="parmname" id="EN-US_TOPIC_0000001943974089__parmname1646331911459"><b>Add AI Application Description</b></span> and enter the document name and URL. You can add up to three descriptions.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_row10630102912539"><td class="cellrowborder" valign="top" width="18.57%" headers="mcps1.3.4.2.3.1.2.5.2.3.1.1 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p14629152935312">Configuration File</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="81.43%" headers="mcps1.3.4.2.3.1.2.5.2.3.1.2 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p763012911534">The system associates the configuration file stored in OBS by default. After enabling this function, you can review and edit the model configuration file.</p>
|
|
<div class="note" id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_note57354444550"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p20735184410553">This function is to be discontinued. After that, you can modify the model configuration by setting <span class="parmname" id="EN-US_TOPIC_0000001943974089__parmname393511557483"><b>AI Engine</b></span>, <span class="parmname" id="EN-US_TOPIC_0000001943974089__parmname1693515574815"><b>Runtime Dependency</b></span>, and <span class="parmname" id="EN-US_TOPIC_0000001943974089__parmname5935955104812"><b>API Configuration</b></span>.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_row3630102914534"><td class="cellrowborder" valign="top" width="18.57%" headers="mcps1.3.4.2.3.1.2.5.2.3.1.1 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p2629102915319">Deployment Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="81.43%" headers="mcps1.3.4.2.3.1.2.5.2.3.1.2 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p86291429165319">Choose the service types for application deployment. The service types you select will be the only options available for deployment. For instance, selecting <strong id="EN-US_TOPIC_0000001943974089__b5108361435">Real-Time Services</strong> means the AI application can only be deployed as real-time services. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_row15127102174611"><td class="cellrowborder" valign="top" width="18.57%" headers="mcps1.3.4.2.3.1.2.5.2.3.1.1 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p51271325468">API Configuration</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="81.43%" headers="mcps1.3.4.2.3.1.2.5.2.3.1.2 "><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p912717220464">You can enable it to edit RESTful APIs to define the AI application input and output formats. The API configuration must comply with ModelArts specifications. For details, see apis parameters in <a href="inference-modelarts-0056.html">Specifications for Editing a Model Configuration File</a>. <a href="inference-modelarts-0056.html#EN-US_TOPIC_0000001943974157__section9498141310396">Code Example of apis Parameters</a> shows an example.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_li73991610194118">Check the information and click <span class="uicontrol" id="EN-US_TOPIC_0000001943974089__uicontrol18774815220"><b>Create now</b></span>.<p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p82831624818">In the AI application list, you can view the created AI application and its version. When the status changes to <strong id="EN-US_TOPIC_0000001943974089__b12184174335217">Normal</strong>, the AI application is created. On this page, you can perform such operations as creating versions, publishing AI applications, and deploying services.</p>
|
|
</li></ol>
|
|
</li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_section67499327247"><h4 class="sectiontitle">Follow-Up Operations</h4><p id="EN-US_TOPIC_0000001943974089__en-us_topic_0207629478_p983815476544"><strong id="EN-US_TOPIC_0000001943974089__b1231924105818"><a href="inference-modelarts-0001.html#EN-US_TOPIC_0000001910014914__section5706068262">Deploying an AI Application as a Service</a></strong>: In the AI application list, click the down arrow on the left of an AI application name to check all versions of the AI application. Locate the row that contains the target version, click <span class="parmname" id="EN-US_TOPIC_0000001943974089__parmname1096619457589"><b>Deploy</b></span> in the <span class="parmname" id="EN-US_TOPIC_0000001943974089__parmname1596694555810"><b>Operation</b></span> column, and select a deployment type from the drop-down list. The AI application can be deployed as a deployment type selected during AI application creation.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="inference-modelarts-0004.html">Creating an AI Application</a></div>
|
|
</div>
|
|
</div>
|
|
|