订阅

UiPath AI Center™

UiPath AI Center™

管理 ML 包

📘

备注:

Starting with 2022.10, importing and exporting ML Packages using scripts is no longer supported.
Check the Import ML Package and Download ML Packages sections for more information on importing and exporting ML Packages using the UI.

上传 ML 包

There are three ways in which you can create a new package:

  • Upload zip file
    Use this option when you have a zip file prepared.
  • Out of the box Packages
    Use this option when you want to use an ML Package developed by UiPath or the Open Source community.
  • 导入 ML 包
    Use this option to import a package that was exported from UiPath AI CenterTM previously,

📘

备注:

To access the Import ML Package page, make sure you have the OOB_UPLOAD role assigned at tenant level. For more information, see Managing permissions at tenant level.

Upload zip file

🚧

重要

上传包之前,请确保已按照此处所述构建包。

When creating an ML Package in AI CenterTM, it cannot be named using any python reserved keyword, such as class, break, from, finally, global, None, etc. Make sure to choose another name. The listed examples are not complete since package name is used for class <pkg-name> and import <pck-name>.

按照以下步骤上传已创建的包:

  1. 在“ML 包”页面中,单击“上传 zip 文件”按钮。系统将显示“新建包”页面。
  2. 在“新建包”页面中,输入包的名称。
  3. 单击“上传包”以选择所需的 .zip 文件,或者将包 .zip 文件拖放到“上传包”字段中。
  4. (可选)提供清楚的模型说明。
    The description is displayed while deploying a new skill based on this model, as well as on the ML Packages page.
  5. 从下拉列表中选择输入类型。可能的选项包括:
    json
    file
    files
  6. (可选)输入模型所需的输入的清楚说明。
  7. (可选)输入模型返回的输出的清楚说明。
    These descriptions are visible to RPA developers using the ML Skill Activity in UiPath Studio. As a good practice, we recommended showing an example of the input and output formats to facilitate communication between data scientists and developers.
  8. 从下拉列表中选择模型的开发语言。可能的选项包括:
    Python 3.6
    Python 3.7
    Python 3.8
    Python 3.8 OpenCV
  9. 选择机器学习模型是否需要 GPU,默认情况下,它设置为“否”。此信息显示为根据此包创建技能时的建议。
  10. 选择是否为模型启用训练。如果启用训练,则会发生此情况:
    The package can be used in any pipeline.
    The validation step checks if the train.py file is implemented in the package, otherwise, the validation fails.
522522
  1. 单击“创建”以上传包,或单击“取消”以中止该过程。“新建包”窗口将关闭,包已上传并与其详细信息一起显示在“ML 包”>“[ML 包名称]”页面中。可能需要几分钟才能传播上传。
12801280

导入 ML 包

Follow these steps to upload a package exported from UiPath AI CenterTM:

  1. In the ML Packages page, click the Import ML Package button. The Import new package page is displayed.
  2. In the Upload package field, add the zip file downloaded using the Downloading ML Packages procedure.
  3. In the Upload metadata json field, add the json file downloaded using the procedure above.
  4. 单击“创建”。
18461846

Private packages

  • The imported package will have the same name as in the export environment, taken from the metadata file. If a package with the same name already exists, the version and trainingVersion fields from the metadata will be checked next. If version and trainingVersion is the same, a new minor version will be created. For example, if you import a package named New Package, version 7, and trainingVersion 2 and you already have a package with the same name, but version 7.2 exists, the new imported package will be version 7.3. If there is no version, the created package will have same version and trainingVersion as in the metadata file.
  • If the name from the imported package metadata does not exist in the destination environment, the new package name is created in the destination environment with same version and trainingVersion as in the metadata file.

Public packages

  • The imported package will have the same name as in the export environment, taken from the metadata file. If a package with the same name already exists, the theversionandtrainingVersionfields from the metadata will be checked next. IfversionandtrainingVersionis the same, a new minor version will be created. If there is no version, the created package will have sameversionandtrainingVersion` as in the metadata file.
  • If the name from the imported package metadata does not exist in the destination environment, the new package name is created in the destination environment with same version and trainingVersion as in the metadata file.

包验证

对于服务

For models uploaded with the Enable Training flag inactive, when a model is uploaded, UiPath AI CenterTM validates the uploaded .zip file against the requirements described here. The following three checks are performed:

  1. A non-empty root folder exists.
  2. requirements.txt 文件已存在。
  3. 根文件夹中存在名为 main.py 的文件,该文件实现了类 Main。进一步验证该类,以实现 __init__predict 函数。

成功或失败以及导致失败的任何错误都会显示在“ML 日志”页面中。

对于训练

For models uploaded with the Enable Training flag active, in addition to validating the requirements as above, AI Center also validates the uploaded .zip file against the requirements described here. For these packages the following two checks are performed:

  1. A non-empty root folder exists.
  2. 根文件夹中存在名为 train.py 的文件,该文件实现了类 Main。进一步验证该类,以实现 __init__ 函数和以下函数:trainevaluatesave

成功或失败以及导致失败的任何错误都会显示在“ML 日志”页面中。

查看 ML 包详细信息

单击列表中的某个包,以前往其“ML 包”>“[ML 包名称]”页面。
在“版本”选项卡中,查看其详细信息:包版本、创建时间、更改日志、状态和参数。

16291629

在“管道运行”选项卡中,查看与包的管道运行相关的详细信息:包名称、类型、版本、状态、创建时间、持续时间、分数和其他详细信息。

16111611

版本控制

AI Center also supports versioning and version management of packages. When a package is uploaded, it's displayed as version 1.0 of that package (we say it's Major Version is 1, and Minor Version is 0**). This helps with differentiating between packages uploaded by users, and packages retrained via pipelines, the latter only changing their minor version.

上传新的 ML 包版本

按照以下步骤上传已上传的包的新版本:

  1. In the ML Packages page, click next to a package and select the Upload new version option.
    或者,在“ML 包”>“[ML 包名称]”页面中,单击“上传新版本”。系统将显示“上传以下包的新版本 > [ML 包名称]”窗口,其中的大多数字段会预先填充您在首次上传该包时提供的信息。
  2. 单击“上传包”以选择所需的 .zip 文件,或者将上述文件拖放到此字段中。
  3. (Optionally) Update the existing information in the following fields:
    输入说明
    输出说明
    Language.
  4. (Optionally) In the ChangeLog field, enter what has changed.
  5. 选择模型是否需要 GPU,默认情况下,它设置为“否”
  6. 选择是否为模型启用训练
  7. 单击“创建”以上传现有包的新版本,或单击“取消”以中止该过程。“上传包”窗口将关闭,并且上传包的新版本。可能需要几分钟才能传播上传。
617617

包的新版本不会直接显示在“ML 包”页面中。您可以在该包的“ML 包详细信息”页面中查看其信息。

📘

备注:

上传现有包的新版本时,将创建新的主要版本。例如,如果我上传了第一个包,则上传的版本将为 1.0。上传新版本时,该版本将为 2.0

训练管道创建的 ML 包版本

当训练管道或完整管道对包版本成功执行时,将创建新的次要版本。例如,如果我已上传包(版本 1.0)并启动训练管道,则完成后“ML 包详细信息”页面将显示版本 1.1,如下所示:

16181618

查看包参数

  1. In the ML Package > [ML Package Name] page Version tab, click next to a package version. The Arguments for > [ML Package Name] > [ML Package Version] window is displayed.
    系统将显示所选包版本的输入类型以及输入和输出说明。请注意,您无法编辑值。

下载 ML 包

You can export an already created package and import it in a different or the same environment.
Follow these steps to download an already created package:

  1. In the ML Packages page, select an already created package from the list.
18511851
  1. In the Version tab, click on the icon of the package.
  2. 单击“下载”
15281528

After clicking Download, two files will be downloaded:

  • A zip file containing the package
  • A json file containing the package metadata, such as name, version, and other information.

删除 ML 包

只有当包未部署在技能中,且这些包当前没有管道正在运行时,您才能将包删除。

  1. In the ML Packages page, click next to a package and select Delete undeployed versions. A confirmation window is displayed.
  2. 在确认窗口中,单击“确定”以删除所选包的所有未部署版本。如果包版本是技能的一部分(处于活动状态),则不会删除该包版本。如果所有版本都处于不活动状态,则将其全部删除。

OR

  1. 在“ML 包”>“[ML 包名称]”页面的“版本”选项卡中,单击包版本旁边的,然后选择“删除”。系统会显示确认窗口。
  2. 在确认窗口中,单击“确定”以删除包的选定版本。如果包版本是技能的一部分(处于活动状态),则不会删除该包版本。如果这是所选包的唯一版本,则包本身也将被删除。

2 个月前更新


管理 ML 包


建议的编辑仅限用于 API 参考页面

您只能建议对 Markdown 正文内容进行编辑,而不能建议对 API 规范进行编辑。