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>
This commit is contained in:
Lai, Weijian 2023-03-01 15:24:28 +00:00 committed by zuul
parent 24b2a3635e
commit 1ad28cc33e
90 changed files with 11951 additions and 0 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
version=""
language="en-us"
type=""

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

View File

@ -0,0 +1,46 @@
<a name="modelarts_04_0001"></a><a name="modelarts_04_0001"></a>
<h1 class="topictitle1">Before You Start</h1>
<div id="body8662426"><p id="modelarts_04_0001__en-us_topic_0130647456_p6158189195313">This document describes how to install and configure a development environment and call functions provided by ModelArts SDK for secondary development.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="modelarts_04_0001__en-us_topic_0130647456_table12471912533" frame="border" border="1" rules="all"><thead align="left"><tr id="modelarts_04_0001__en-us_topic_0130647456_row91587975314"><th align="left" class="cellrowborder" valign="top" width="19.91%" id="mcps1.3.2.1.3.1.1"><p id="modelarts_04_0001__en-us_topic_0130647456_p91591911533">Section</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="80.08999999999999%" id="mcps1.3.2.1.3.1.2"><p id="modelarts_04_0001__en-us_topic_0130647456_p315917911538">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="modelarts_04_0001__en-us_topic_0130647456_row2159179165313"><td class="cellrowborder" valign="top" width="19.91%" headers="mcps1.3.2.1.3.1.1 "><p id="modelarts_04_0001__en-us_topic_0130647456_p1252931211589"><a href="modelarts_04_0002.html">SDK Overview</a></p>
</td>
<td class="cellrowborder" valign="top" width="80.08999999999999%" headers="mcps1.3.2.1.3.1.2 "><p id="modelarts_04_0001__en-us_topic_0130647456_p1652815125580">Concepts of ModelArts SDK</p>
</td>
</tr>
<tr id="modelarts_04_0001__en-us_topic_0130647456_row1615916914534"><td class="cellrowborder" valign="top" width="19.91%" headers="mcps1.3.2.1.3.1.1 "><p id="modelarts_04_0001__en-us_topic_0130647456_p1754453610242"><a href="modelarts_04_0005.html">Environment Preparations</a></p>
<p id="modelarts_04_0001__en-us_topic_0130647456_p1276153635620"><a href="modelarts_04_0004.html">SDK Download</a></p>
<p id="modelarts_04_0001__en-us_topic_0130647456_p19721153982315"><a href="modelarts_04_0044.html">Viewing Project ID</a></p>
</td>
<td class="cellrowborder" valign="top" width="80.08999999999999%" headers="mcps1.3.2.1.3.1.2 "><p id="modelarts_04_0001__en-us_topic_0130647456_p152541218586">How to make preparations for secondary development using ModelArts SDK</p>
</td>
</tr>
<tr id="modelarts_04_0001__en-us_topic_0130647456_row655963213132"><td class="cellrowborder" valign="top" width="19.91%" headers="mcps1.3.2.1.3.1.1 "><p id="modelarts_04_0001__en-us_topic_0130647456_p1056053216130"><a href="modelarts_04_0123.html">Session Authentication</a></p>
</td>
<td class="cellrowborder" valign="top" width="80.08999999999999%" headers="mcps1.3.2.1.3.1.2 "><p id="modelarts_04_0001__en-us_topic_0130647456_p17560432161318">How to authenticate resources and initialize ModelArts SDK Client and OBS Client</p>
</td>
</tr>
<tr id="modelarts_04_0001__en-us_topic_0130647456_row104873162316"><td class="cellrowborder" valign="top" width="19.91%" headers="mcps1.3.2.1.3.1.1 "><p id="modelarts_04_0001__en-us_topic_0130647456_p14913113238"><a href="modelarts_04_0217.html">Overview of OBS Management</a></p>
</td>
<td class="cellrowborder" valign="top" width="80.08999999999999%" headers="mcps1.3.2.1.3.1.2 "><p id="modelarts_04_0001__en-us_topic_0130647456_p20345141914367">How to call the SDK APIs of Object Storage Service (OBS), including the APIs for creating OBS buckets, uploading and downloading files and folders, as well as deleting OBS objects and buckets</p>
</td>
</tr>
<tr id="modelarts_04_0001__en-us_topic_0130647456_row156286547492"><td class="cellrowborder" valign="top" width="19.91%" headers="mcps1.3.2.1.3.1.1 "><p id="modelarts_04_0001__en-us_topic_0130647456_p204471529174">ModelArts SDK operations:</p>
<p id="modelarts_04_0001__en-us_topic_0130647456_p72067265815"><a href="modelarts_04_0131.html">Training Management</a></p>
<p id="modelarts_04_0001__en-us_topic_0130647456_p991392115818"><a href="modelarts_04_0194.html">Model Management</a></p>
<p id="modelarts_04_0001__en-us_topic_0130647456_p1659243135812"><a href="modelarts_04_0200.html">Service Management</a></p>
</td>
<td class="cellrowborder" valign="top" width="80.08999999999999%" headers="mcps1.3.2.1.3.1.2 "><p id="modelarts_04_0001__en-us_topic_0130647456_p562912546494">Common operations using ModelArts SDK</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>

View File

@ -0,0 +1,8 @@
<a name="modelarts_04_0002"></a><a name="modelarts_04_0002"></a>
<h1 class="topictitle1">SDK Overview</h1>
<div id="body8662426"><p id="modelarts_04_0002__en-us_topic_0130654806_p37755611570">ModelArts Software Development Kit (ModelArts SDK) encapsulates the ModelArts RESTful APIs in Python language to simplify application development. You can directly call ModelArts SDK to easily manage datasets, start AI training, generate models, and deploy the models.</p>
<p id="modelarts_04_0002__en-us_topic_0130654806_p1249312340">ModelArts SDK supports only the Python language, including Python 2.7, Python 3.6, Python 3.7, and later versions.</p>
</div>
<div></div>

View File

@ -0,0 +1,17 @@
<a name="modelarts_04_0003"></a><a name="modelarts_04_0003"></a>
<h1 class="topictitle1">Preparations</h1>
<div id="body8662426"></div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="modelarts_04_0005.html">Environment Preparations</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0004.html">Downloading and Installing the SDK</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0044.html">Viewing the Project ID</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0300.html">Configuring a Service Endpoint</a></strong><br>
</li>
</ul>
</div>

View File

@ -0,0 +1,31 @@
<a name="modelarts_04_0004"></a><a name="modelarts_04_0004"></a>
<h1 class="topictitle1">Downloading and Installing the SDK</h1>
<div id="body8662426"><div class="section" id="modelarts_04_0004__en-us_topic_0130654808_section16657165520146"><h4 class="sectiontitle">Download ModelArts SDK</h4><p id="modelarts_04_0004__p330243994616"><a href="https://obs-sdk.obs.eu-de.otc.t-systems.com/modelarts-latest-py2.py3-none-any.whl" target="_blank" rel="noopener noreferrer">Download the ModelArts SDK software package</a> of the latest version.</p>
</div>
<div class="section" id="modelarts_04_0004__en-us_topic_0130654808_section536631020158"><h4 class="sectiontitle">Installing the SDK</h4><p id="modelarts_04_0004__en-us_topic_0130654808_p061516124116">After the SDK is downloaded, you can use pip to install it. For details about how to install pip, see the <a href="https://pip.pypa.io/en/stable/installation/" target="_blank" rel="noopener noreferrer">pip official website</a>. To install the ModelArts SDK, run the following command:</p>
<p id="modelarts_04_0004__en-us_topic_0130654808_p1641035217517"><b><span class="cmdname" id="modelarts_04_0004__en-us_topic_0130654808_cmdname125744215613">pip install modelarts-latest-py2.py3-none-any.whl</span></b></p>
<div class="p" id="modelarts_04_0004__en-us_topic_0130654808_p205292261557">The required dependency packages are installed by default during SDK installation. The details are as follows:<pre class="screen" id="modelarts_04_0004__en-us_topic_0130654808_screen1540231914552">certifi &gt;= 14.05.14
six &gt;= 1.10
python_dateutil &gt;= 2.5.3
setuptools &gt;= 21.0.0
urllib3 &gt;= 1.15.1
requests &gt;= 2.19.1
esdk-obs-python == 3.0.5
Flask==1.0.2
Flask-Cors==3.0.4
gunicorn==19.8.1
mxnet-model-server==0.3
psutil==5.4.6
prometheus_client==0.3.1</pre>
</div>
<p id="modelarts_04_0004__en-us_topic_0130654808_p4425111620112">If an error message is displayed during the installation, indicating that a required dependency package is missing, run the following command to install the dependency package as prompted. In the command, <em id="modelarts_04_0004__en-us_topic_0130654808_i91141713515">xxxx</em> indicates the name of the dependency package.</p>
<p id="modelarts_04_0004__en-us_topic_0130654808_p5966172316123"><b><span class="cmdname" id="modelarts_04_0004__en-us_topic_0130654808_cmdname1592111819135">pip install xxxx</span></b></p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="modelarts_04_0003.html">Preparations</a></div>
</div>
</div>

View File

@ -0,0 +1,16 @@
<a name="modelarts_04_0005"></a><a name="modelarts_04_0005"></a>
<h1 class="topictitle1">Environment Preparations</h1>
<div id="body8662426"><p id="modelarts_04_0005__en-us_topic_0130654809_p57215282120">ModelArts SDK can be used in the following environments:</p>
<ul id="modelarts_04_0005__en-us_topic_0130654809_ul7544243182020"><li id="modelarts_04_0005__en-us_topic_0130654809_li1754412439204">ModelArts SDK has been integrated into ModelArts Notebook and can be directly used without session authentication.<p id="modelarts_04_0005__en-us_topic_0130654809_p66408408216"><a name="modelarts_04_0005__en-us_topic_0130654809_li1754412439204"></a><a name="en-us_topic_0130654809_li1754412439204"></a>On the ModelArts management console, access the <strong id="modelarts_04_0005__en-us_topic_0130654809_b143715371314">DevEnviron</strong> module, create a notebook instance, and directly call the ModelArts SDK APIs in the <strong id="modelarts_04_0005__en-us_topic_0130654809_b2104135117114">Terminal</strong> or Ipynb file. You can call the SDK in a notebook instance to perform operations such as OBS management, job management, model management, and service management by referring to the API reference.</p>
</li><li id="modelarts_04_0005__en-us_topic_0130654809_li187401462209">ModelArts SDK can be installed and configured in the local Windows- or Linux-based environment.<p id="modelarts_04_0005__en-us_topic_0130654809_p165417382372"><a name="modelarts_04_0005__en-us_topic_0130654809_li187401462209"></a><a name="en-us_topic_0130654809_li187401462209"></a>Download and install Python 2 or Python 3 from the <a href="https://www.python.org/" target="_blank" rel="noopener noreferrer">official website of Python</a> (Python 2.7, Python 3.6, Python 3.7, or later is recommended), and configure a Python runtime environment.</p>
<div class="note" id="modelarts_04_0005__en-us_topic_0130654809_note844285713323"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="modelarts_04_0005__en-us_topic_0130654809_ul17535171573410"><li id="modelarts_04_0005__en-us_topic_0130654809_li17784414238">After Python is installed, you can enter <span class="parmname" id="modelarts_04_0005__en-us_topic_0130654809_parmname87813416234"><b>python</b></span> or <span class="parmname" id="modelarts_04_0005__en-us_topic_0130654809_parmname1421434016304"><b>python3</b></span> in the command line interface (CLI) and press <strong id="modelarts_04_0005__en-us_topic_0130654809_b12550918133">Enter</strong> to view the Python version and enter the Python environment.</li><li id="modelarts_04_0005__en-us_topic_0130654809_li5725131712347">In the Windows-based environment, if a message is displayed indicating that the command is not an internal or external command, add the Python and pip installation paths to <strong id="modelarts_04_0005__en-us_topic_0130654809_b1885675723012">Path</strong> in the environment variable. The pip installation path is usually the <strong id="modelarts_04_0005__en-us_topic_0130654809_b172920451547">Scripts</strong> folder in the directory where Python is located.</li></ul>
</div></div>
</li></ul>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="modelarts_04_0003.html">Preparations</a></div>
</div>
</div>

View File

@ -0,0 +1,20 @@
<a name="modelarts_04_0006"></a><a name="modelarts_04_0006"></a>
<h1 class="topictitle1">OBS Management (Recommended)</h1>
<div id="body8662426"><p id="modelarts_04_0006__en-us_topic_0220956293_p8060118"></p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="modelarts_04_0217.html">Overview of OBS Management</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0218.html">Uploading a File to OBS</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0219.html">Uploading a Folder to OBS</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0220.html">Downloading a File from OBS</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0221.html">Downloading a Folder from OBS</a></strong><br>
</li>
</ul>
</div>

View File

@ -0,0 +1,14 @@
<a name="modelarts_04_0044"></a><a name="modelarts_04_0044"></a>
<h1 class="topictitle1">Viewing the Project ID</h1>
<div id="body8662426"><p id="modelarts_04_0044__en-us_topic_0160897370_en-us_topic_0101662393_p8112855194115">When calling APIs, you need to specify the project ID in certain URLs. To do so, you need to obtain the project ID first. To obtain a project ID, perform the following operations:</p>
<ol id="modelarts_04_0044__en-us_topic_0160897370_en-us_topic_0101662393_ol8715914194127"><li id="modelarts_04_0044__en-us_topic_0160897370_en-us_topic_0101662393_li2804809915217">Click the username and choose <strong id="modelarts_04_0044__en-us_topic_0160897370_b321414395263"></strong><strong id="modelarts_04_0044__en-us_topic_0160897370_b19214173915260">My Credential</strong> from the drop-down list.<p id="modelarts_04_0044__en-us_topic_0160897370_en-us_topic_0101662393_p136772519449">On the <strong id="modelarts_04_0044__en-us_topic_0160897370_b135034792014">My Credential</strong> page, view project IDs in the project list.</p>
</li></ol>
<div class="fignone" id="modelarts_04_0044__en-us_topic_0160897370_en-us_topic_0101662393_fig39324824103512"><span class="figcap"><b>Figure 1 </b>Viewing project ID</span><br><span><img id="modelarts_04_0044__en-us_topic_0160897370_en-us_topic_0101662393_image538470016132" src="en-us_image_0000001455263253.jpg"></span></div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="modelarts_04_0003.html">Preparations</a></div>
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,20 @@
<a name="modelarts_04_0099"></a><a name="modelarts_04_0099"></a>
<h1 class="topictitle1">Change History</h1>
<div id="body8662426">
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="modelarts_04_0099__en-us_topic_0135264638_en-us_topic_0135264638_table4331195115321" frame="border" border="1" rules="all"><thead align="left"><tr id="modelarts_04_0099__en-us_topic_0135264638_en-us_topic_0135264638_row0331135113328"><th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.1.1.3.1.1"><p id="modelarts_04_0099__en-us_topic_0135264638_en-us_topic_0135264638_p133185110325">Released On</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="81%" id="mcps1.3.1.1.3.1.2"><p id="modelarts_04_0099__en-us_topic_0135264638_en-us_topic_0135264638_p1933135143213">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="modelarts_04_0099__en-us_topic_0135264638_en-us_topic_0135264638_row4331145115321"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.1.1.3.1.1 "><p id="modelarts_04_0099__en-us_topic_0135264638_en-us_topic_0135264638_p633275133217">2022-11-17</p>
</td>
<td class="cellrowborder" valign="top" width="81%" headers="mcps1.3.1.1.3.1.2 "><p id="modelarts_04_0099__en-us_topic_0135264638_en-us_topic_0135264638_p113321651163210">This is the first official release.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>

View File

@ -0,0 +1,19 @@
<a name="modelarts_04_0123"></a><a name="modelarts_04_0123"></a>
<h1 class="topictitle1">Overview of Session Authentication</h1>
<div id="body8662426"><p id="modelarts_04_0123__en-us_topic_0181617588_en-us_topic_0160123269_p24234449275">The session module authenticates in-cloud resources and initializes ModelArts SDK Client and OBS Client. After a session is set up, you can directly call the ModelArts SDK APIs.</p>
<ul id="modelarts_04_0123__en-us_topic_0181617588_ul10326736154013"><li id="modelarts_04_0123__li1569194715713">ModelArts notebook can be directly used without configuring session authentication parameters. The sample code is as follows:<div class="codecoloring" codetype="Python" id="modelarts_04_0123__en-us_topic_0181617588_screen8361620153111"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
<span class="normal">2</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="n">session</span> <span class="o">=</span> <span class="n">Session</span><span class="p">()</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="modelarts_04_0123__li76913474570">When using the ModelArts SDK in other development environments, select one of the following authentication methods for session authentication:<ul id="modelarts_04_0123__ul9784125013572"><li id="modelarts_04_0123__en-us_topic_0181617588_li3327123617400"><a href="modelarts_04_0154.html">Authentication Using the Username and Password</a>: Available for <a href="modelarts_04_0217.html">OBS Management</a>, <a href="modelarts_04_0131.html">Training Management</a>, <a href="modelarts_04_0194.html">Model Management</a>, and <a href="modelarts_04_0200.html">Service Management</a>.</li><li id="modelarts_04_0123__en-us_topic_0181617588_li998818430409"><a href="modelarts_04_0155.html">AK/SK-based Authentication</a>: Available for <a href="modelarts_04_0217.html">OBS Management</a>, <a href="modelarts_04_0131.html">Training Management</a>, <a href="modelarts_04_0194.html">Model Management</a>, and <a href="modelarts_04_0200.html">Service Management</a>.</li></ul>
</li></ul>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="modelarts_04_0153.html">Session Authentication</a></div>
</div>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,15 @@
<a name="modelarts_04_0153"></a><a name="modelarts_04_0153"></a>
<h1 class="topictitle1">Session Authentication</h1>
<div id="body8662426"></div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="modelarts_04_0123.html">Overview of Session Authentication</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0154.html">Authentication Using the Username and Password</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0155.html">AK/SK-based Authentication</a></strong><br>
</li>
</ul>
</div>

View File

@ -0,0 +1,29 @@
<a name="modelarts_04_0154"></a><a name="modelarts_04_0154"></a>
<h1 class="topictitle1">Authentication Using the Username and Password</h1>
<div id="body8662426"><p id="modelarts_04_0154__en-us_topic_0180093757_p1125123318185">This authentication method is available for <a href="modelarts_04_0217.html">OBS Management</a>, <a href="modelarts_04_0131.html">Training Management</a>, <a href="modelarts_04_0194.html">Model Management</a>, and <a href="modelarts_04_0200.html">Service Management</a>.</p>
<div class="section" id="modelarts_04_0154__en-us_topic_0180093757_en-us_topic_0173871415_section16168150185217"><h4 class="sectiontitle">Sample Code</h4><div class="p" id="modelarts_04_0154__p19581175719306">Set <span class="parmname" id="modelarts_04_0154__parmname0581257123010"><b>account</b></span> to your domain name and <span class="parmname" id="modelarts_04_0154__parmname145814571304"><b>username</b></span> to your username.<div class="codecoloring" codetype="Python" id="modelarts_04_0154__screen15581135715300"><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>
<span class="normal">6</span>
<span class="normal">7</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="c1"># Set endpoint</span>
<span class="n">Session</span><span class="o">.</span><span class="n">set_endpoint</span><span class="p">(</span><span class="n">iam_endpoint</span><span class="o">=</span><span class="s1">'***'</span><span class="p">,</span>
<span class="n">obs_endpoint</span><span class="o">=</span><span class="s1">'***'</span><span class="p">,</span>
<span class="n">modelarts_endpoint</span><span class="o">=</span><span class="s1">'***'</span><span class="p">,</span>
<span class="n">region_name</span><span class="o">=</span><span class="s1">'***'</span><span class="p">)</span>
<span class="n">session</span> <span class="o">=</span> <span class="n">Session</span><span class="p">(</span><span class="n">account</span><span class="o">=</span><span class="s1">'***'</span><span class="p">,</span> <span class="n">username</span><span class="o">=</span><span class="s1">'***'</span><span class="p">,</span> <span class="n">password</span><span class="o">=</span><span class="s1">'***'</span><span class="p">,</span> <span class="n">region_name</span><span class="o">=</span><span class="s1">'***'</span><span class="p">,</span> <span class="n">project_id</span><span class="o">=</span><span class="s1">'***'</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="modelarts_04_0153.html">Session Authentication</a></div>
</div>
</div>

View File

@ -0,0 +1,30 @@
<a name="modelarts_04_0155"></a><a name="modelarts_04_0155"></a>
<h1 class="topictitle1">AK/SK-based Authentication</h1>
<div id="body8662426"><p id="modelarts_04_0155__en-us_topic_0180093758_p67521156101813">This authentication method is available for <a href="modelarts_04_0217.html">OBS Management</a>, <a href="modelarts_04_0131.html">Training Management</a>, <a href="modelarts_04_0194.html">Model Management</a>, and <a href="modelarts_04_0200.html">Service Management</a>.</p>
<div class="section" id="modelarts_04_0155__en-us_topic_0180093758_en-us_topic_0173871416_section1139662914522"><h4 class="sectiontitle">Sample Code</h4><div class="codecoloring" codetype="Python" id="modelarts_04_0155__en-us_topic_0180093758_screen697215575371"><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>
<span class="normal">6</span>
<span class="normal">7</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="c1"># Set endpoint</span>
<span class="n">Session</span><span class="o">.</span><span class="n">set_endpoint</span><span class="p">(</span><span class="n">iam_endpoint</span><span class="o">=</span><span class="s1">'***'</span><span class="p">,</span>
<span class="n">obs_endpoint</span><span class="o">=</span><span class="s1">'***'</span><span class="p">,</span>
<span class="n">modelarts_endpoint</span><span class="o">=</span><span class="s1">'***'</span><span class="p">,</span>
<span class="n">region_name</span><span class="o">=</span><span class="s1">'***'</span><span class="p">)</span>
<span class="n">session</span> <span class="o">=</span> <span class="n">Session</span><span class="p">(</span><span class="n">access_key</span><span class="o">=</span><span class="s1">'***'</span><span class="p">,</span><span class="n">secret_key</span><span class="o">=</span><span class="s1">'***'</span><span class="p">,</span> <span class="n">project_id</span><span class="o">=</span><span class="s1">'***'</span><span class="p">,</span> <span class="n">region_name</span><span class="o">=</span><span class="s1">'***'</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
<p id="modelarts_04_0155__en-us_topic_0180093758_p0195116144110">Parameters in this command are described as follows:</p>
<ul id="modelarts_04_0155__en-us_topic_0180093758_ul4622797388"><li id="modelarts_04_0155__en-us_topic_0180093758_li37831811183818">For details about how to obtain the values of <strong id="modelarts_04_0155__en-us_topic_0180093758_b178474381524">access_key</strong> and <strong id="modelarts_04_0155__en-us_topic_0180093758_b159331042115219">secret_key</strong>, see <a href="https://docs.otc.t-systems.com/modelarts/umn/preparations/configuring_access_authorization_global_configuration/configuring_access_key_authorization.html#obtaining-an-access-key" target="_blank" rel="noopener noreferrer">Obtaining an Access Key</a>.</li><li id="modelarts_04_0155__en-us_topic_0180093758_li02341120131518"><span class="parmvalue" id="modelarts_04_0155__en-us_topic_0180093758_parmvalue161988565369"><b>project_id</b></span> indicates the project ID. </li><li id="modelarts_04_0155__en-us_topic_0180093758_li1184615141354"><span class="parmvalue" id="modelarts_04_0155__en-us_topic_0180093758_parmvalue117240863717"><b>region_name</b></span> indicates the region ID. Obtain the region ID from the system administrator.</li></ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="modelarts_04_0153.html">Session Authentication</a></div>
</div>
</div>

View File

@ -0,0 +1,21 @@
<a name="modelarts_04_0157"></a><a name="modelarts_04_0157"></a>
<h1 class="topictitle1">Training Management</h1>
<div id="body8662426"></div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="modelarts_04_0158.html">Training Jobs</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0167.html">Training Job Versions</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0173.html">Training Job Parameter Configuration</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0180.html">Visualization Jobs</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0189.html">Resource and Engine Specifications</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0077.html">Job Statuses</a></strong><br>
</li>
</ul>
</div>

View File

@ -0,0 +1,28 @@
<a name="modelarts_04_0158"></a><a name="modelarts_04_0158"></a>
<h1 class="topictitle1">Training Jobs</h1>
<div id="body8662426"><p id="modelarts_04_0158__en-us_topic_0180094051_en-us_topic_0170904389_p43047308016"></p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="modelarts_04_0131.html">Creating a Training Job</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0160.html">Querying the List of Training Jobs</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0161.html">Querying the Details About a Training Job</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0162.html">Modifying the Description of a Training Job</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0163.html">Obtaining the Name of a Training Job Log File</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0164.html">Querying Training Job Logs</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0166.html">Deleting a Training Job</a></strong><br>
</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="modelarts_04_0157.html">Training Management</a></div>
</div>
</div>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,96 @@
<a name="modelarts_04_0166"></a><a name="modelarts_04_0166"></a>
<h1 class="topictitle1">Deleting a Training Job</h1>
<div id="body8662426"><div class="section" id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_section20261580353"><h4 class="sectiontitle">Sample Code</h4><p id="modelarts_04_0166__en-us_topic_0180094058_p730511113430">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="p" id="modelarts_04_0166__en-us_topic_0180094058_p1156162203815">Method 1: Delete a training job based on the specified <strong id="modelarts_04_0166__en-us_topic_0180094058_b15318121114482">job_id</strong>.<div class="codecoloring" codetype="Python" id="modelarts_04_0166__en-us_topic_0180094058_screen735412413136"><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">Estimator</span><span class="o">.</span><span class="n">delete_job_by_id</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">job_id</span><span class="o">=</span><span class="s2">&quot;155500&quot;</span><span class="p">)</span>
</pre></div></td></tr></table></div>
</div>
</div>
<p id="modelarts_04_0166__en-us_topic_0180094058_p24321849184314">Method 2: Delete the training job created in <a href="modelarts_04_0131.html">Creating a Training Job</a>.</p>
<div class="codecoloring" codetype="Python" id="modelarts_04_0166__en-us_topic_0180094058_screen1130525115134"><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_instance</span><span class="o">.</span><span class="n">delete_job</span><span class="p">()</span>
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_section3889526413"><h4 class="sectiontitle">Parameter Description</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_table155461191218" frame="border" border="1" rules="all"><caption><b>Table 1 </b><strong id="modelarts_04_0166__en-us_topic_0180094058_b636424812484">delete_job_by_id</strong> request parameters</caption><thead align="left"><tr id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_row254817912212"><th align="left" class="cellrowborder" valign="top" width="22.75%" id="mcps1.3.2.2.2.5.1.1"><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p12549899214">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="9.879999999999999%" id="mcps1.3.2.2.2.5.1.2"><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p3552101193813">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.34%" id="mcps1.3.2.2.2.5.1.3"><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p1755169172118">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="54.03%" id="mcps1.3.2.2.2.5.1.4"><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p55521998211">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_row8893215413"><td class="cellrowborder" valign="top" width="22.75%" headers="mcps1.3.2.2.2.5.1.1 "><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p6891421842">modelarts_session</p>
</td>
<td class="cellrowborder" valign="top" width="9.879999999999999%" headers="mcps1.3.2.2.2.5.1.2 "><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p68972047">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="13.34%" headers="mcps1.3.2.2.2.5.1.3 "><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p158912219419">Object</p>
</td>
<td class="cellrowborder" valign="top" width="54.03%" headers="mcps1.3.2.2.2.5.1.4 "><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_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_0166__en-us_topic_0180094058_en-us_topic_0160620263_row1530181931"><td class="cellrowborder" valign="top" width="22.75%" headers="mcps1.3.2.2.2.5.1.1 "><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p117415916499">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="9.879999999999999%" headers="mcps1.3.2.2.2.5.1.2 "><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p6675978319">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="13.34%" headers="mcps1.3.2.2.2.5.1.3 "><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p46751171339">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.03%" headers="mcps1.3.2.2.2.5.1.4 "><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p467516712319">ID of a training job. You can query <strong id="modelarts_04_0166__en-us_topic_0180094058_b795042164510">job_id</strong> using the training job object generated in <a href="modelarts_04_0131.html">Creating a Training Job</a>, for example, <span class="filepath" id="modelarts_04_0166__en-us_topic_0180094058_filepath119515214513"><b>job_instance.job_id</b></span>, or from the response obtained in <a href="modelarts_04_0160.html">Querying the List of Training Jobs</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_table1221422915578" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_b1082121233116">delete_job_by_id</strong> response parameters</caption><thead align="left"><tr id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_row6616560815578"><th align="left" class="cellrowborder" valign="top" width="26.02%" id="mcps1.3.2.3.2.4.1.1"><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p39128198155725">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="35.980000000000004%" id="mcps1.3.2.3.2.4.1.2"><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p28702598155725">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="38%" id="mcps1.3.2.3.2.4.1.3"><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p43209091155725">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_row1757872301417"><td class="cellrowborder" valign="top" width="26.02%" headers="mcps1.3.2.3.2.4.1.1 "><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p1358132391416">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="35.980000000000004%" headers="mcps1.3.2.3.2.4.1.2 "><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p11581182310140">String</p>
</td>
<td class="cellrowborder" valign="top" width="38%" headers="mcps1.3.2.3.2.4.1.3 "><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p202911533131416">Error message when the API call fails.</p>
<p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p729215339148">This parameter is not included when the API call succeeds.</p>
</td>
</tr>
<tr id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_row4566967315578"><td class="cellrowborder" valign="top" width="26.02%" headers="mcps1.3.2.3.2.4.1.1 "><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p25254004155725">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="35.980000000000004%" headers="mcps1.3.2.3.2.4.1.2 "><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p66849440155725">String</p>
</td>
<td class="cellrowborder" valign="top" width="38%" headers="mcps1.3.2.3.2.4.1.3 "><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p46095573155725">Error code when the API call fails.</p>
<p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0160620263_p42753918155725">This parameter is not included when the API call succeeds.</p>
</td>
</tr>
<tr id="modelarts_04_0166__en-us_topic_0180094058_row169814265230"><td class="cellrowborder" valign="top" width="26.02%" headers="mcps1.3.2.3.2.4.1.1 "><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0170904393_p165091347181414">is_success</p>
</td>
<td class="cellrowborder" valign="top" width="35.980000000000004%" headers="mcps1.3.2.3.2.4.1.2 "><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0170904393_p132973125542">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="38%" headers="mcps1.3.2.3.2.4.1.3 "><p id="modelarts_04_0166__en-us_topic_0180094058_en-us_topic_0170904393_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_0158.html">Training Jobs</a></div>
</div>
</div>

View File

@ -0,0 +1,24 @@
<a name="modelarts_04_0167"></a><a name="modelarts_04_0167"></a>
<h1 class="topictitle1">Training Job Versions</h1>
<div id="body8662426"><p id="modelarts_04_0167__en-us_topic_0180346060_p8060118"></p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="modelarts_04_0168.html">Creating a Training Job Version</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0169.html">Querying the List of Training Job Versions</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0170.html">Querying the Details About a Training Job Version</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0171.html">Stopping a Training Job Version</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0172.html">Deleting a Training Job Version</a></strong><br>
</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="modelarts_04_0157.html">Training Management</a></div>
</div>
</div>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
<a name="modelarts_04_0173"></a><a name="modelarts_04_0173"></a>
<h1 class="topictitle1">Training Job Parameter Configuration</h1>
<div id="body8662426"></div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="modelarts_04_0174.html">Creating a Training Job Configuration</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0175.html">Querying the List of Training Job Parameter Configuration Objects</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0176.html">Querying the List of Training Job Configurations</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0177.html">Querying the Details About a Training Job Configuration</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0178.html">Modifying a Training Job Configuration</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0179.html">Deleting a Training Job Configuration</a></strong><br>
</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="modelarts_04_0157.html">Training Management</a></div>
</div>
</div>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,29 @@
<a name="modelarts_04_0180"></a><a name="modelarts_04_0180"></a>
<h1 class="topictitle1">Visualization Jobs</h1>
<div id="body8662426"></div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="modelarts_04_0181.html">Creating a Visualization Job</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0182.html">Querying the List of Visualization Job Objects</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0183.html">Querying the List of Visualization Jobs</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0184.html">Querying the Details About a Visualization Job</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0185.html">Modifying the Description of a Visualization Job</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0186.html">Stopping a Visualization Job</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0187.html">Restarting a Visualization Job</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0188.html">Deleting a Visualization Job</a></strong><br>
</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="modelarts_04_0157.html">Training Management</a></div>
</div>
</div>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,20 @@
<a name="modelarts_04_0189"></a><a name="modelarts_04_0189"></a>
<h1 class="topictitle1">Resource and Engine Specifications</h1>
<div id="body8662426"><p id="modelarts_04_0189__en-us_topic_0180346941_p8060118"></p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="modelarts_04_0190.html">Querying a Built-in Algorithm</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0191.html">Querying the List of Resource Flavors</a></strong><br>
</li>
<li class="ulchildlink"><strong><a href="modelarts_04_0192.html">Querying the List of Engine Types</a></strong><br>
</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="modelarts_04_0157.html">Training Management</a></div>
</div>
</div>

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More