ai-center
2022.10
false
UiPath logo, featuring letters U and I in white

AI Center User Guide

Automation CloudAutomation SuiteStandalone
Last updated Oct 17, 2024

Managing ML packages

Note:

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.

Uploading ML Packages

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.
  • Import ML Package: use this option to import a package that was exported from UiPath AI Center previously,
    Note: 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

Important:

Before uploading packages, make sure they are built as specified here.

When creating an ML Package in AI Center, 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>.

Follow these steps to upload an already created package:

  1. In the ML Packages page, click the Upload zip file button. The Create New Package page is displayed.
  2. In the Create New Package page, enter a name for your package.
  3. Click Upload Package to select the desired .zip file or drag & drop the package .zip file into the Upload package field.
  4. (Optionally) Provide a clear description of the model.

    The description is displayed while deploying a new skill based on this model, as well as on the ML Packages page.

  5. Select the input type from the drop-down. The possible options are:
    • json
    • file
    • files
  6. Optional: Enter a clear description of the input expected by the model.
  7. Optional: Enter a clear description of the output returned by the model.
    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. Select the development language of the model from the drop-down. The possible options are:
    • Python 3.7
    • Python 3.8
    • Python 3.8 OpenCV
  9. Select whether the machine learning model requires a GPU, by default it is set to No. This information is surfaced as a suggestion to when a skill is created from this package.
  10. Select whether to enable training for your model. This is what happens if you enabled it:
    • 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.
  11. Click Create to upload the package or Cancel to abort the process. The Create New Package window is closed and the package is uploaded and displayed along with its details in the ML Packages > [ML Package Name] page. It may take a few minutes before your upload is propagated.

Import ML package

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

  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. Click Create.

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 field from the metadata will be checked next. If the version is the same, a new minor version will be created. For example, if you import a package named New Package, version 7, and you already have a package with the same name, but version 7.3 exists, the new imported package will be version 7.4. If there is no version, the created package will have the next available major version.
  • 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.

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 sourcePackageVersion field from the metadata will be checked next for the sourcePackageVersion in the destination environment. After this, the next minor version will be uploaded. Make sure to either change the version in the destination environment, or change the sourcePackageVersion field in the metadata file to the available version in the destination environment.
  • 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.

Package validations

For serving

For models uploaded with the Enable Training flag inactive, when a model is uploaded, AI Center validates the uploaded .zip file against the requirements described here. The following three checks are performed:
  1. A non-empty root folder exists.
  2. A requirements.txt file exists.
  3. A file named main.py exists in the root folder which implements a class Main. The class is further validated to implement an __init__ and a predict function.

Success or failure along with any errors that caused it are shown on the ML Logs page.

For training

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. A file named train.py exists in the root folder which implements a class Main. The class is further validated to implement an __init__ function and the following functions: train, evaluate, and save.

Success or failure along with any errors that caused it are shown on the ML Logs page.

Viewing ML package details

Click a package in the list to navigate to its ML Package > [ML Package Name] page.

In the Version tab, view its details: package version, creation time, change log, status, whether or not training is enabled, whether or not recommended GPU is enabled, and arguments.



You can find more information on each entry in the ML Packages Version by clicking on the ⁝ icon and then Details. A dialog box will be displayed with all the information on the package version.



In the Pipeline runs tab, view the details related to the package's pipeline runs: package name, type, version, status, creation time, duration, score, and additional details.

Version control

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.

Uploading new ML package versions

Follow these steps to upload a new version for an already uploaded package:

  1. In the ML Packages page, click ⁝ next to a package and select the Upload new version option.

    Alternatively, in the ML Package > [ML Package Name] page, click Upload new version. The Upload New Package Version for > [ML Package Name] window is displayed, with most of the fields prefilled with the information you provided at the time when you first uploaded that package.

  2. Click Upload Package to select the desired .zip file, or drag & drop the file above this field.
  3. Optional: Update the existing information in the following fields:
    • Input description
    • Output description
    • Language
  4. Optional: In the ChangeLog field, enter what has changed.
  5. Select whether the model requires a GPU, by default it is set to No.
  6. Select whether to enable training for your model.
  7. Click Create to upload the new version for the existing uploaded package or Cancel to abort the process. The Upload Package window is closed and the new version of the package is uploaded. It may take a few minutes before your upload is propagated.


The new version of the package is not visible directly in the ML Packages page. You can view its information within the ML Package Details page for that package.

Note: When a new version is uploaded on an existing package, that creates a new major version. For example, if I have uploaded my first package, that upload will be version 1.0. When I upload a new version, that version will be 2.0.

ML package versions created by training pipelines

When a training pipeline or a full pipeline executes successfully on a package version, a new minor version is created. For example, if I have uploaded a package (version 1.0), and start a training pipeline, version 1.1 is displayed after completion in the ML Package Details page as below:



Viewing package arguments

In the ML Package > [ML Package Name] page Version tab, click the information icon next to a package version. The Arguments for > [ML Package Name] > [ML Package Version] window is displayed.

The input type, and the input and output descriptions of the selected package version are displayed. Please note that you cannot edit the values.

Downloading ML packages

You can export an already created package and import it in a different or the same environment.

Note: Base versions of Docker-based models cannot be downloaded since there is no ZIP file available. Once the Docker-based model is trained, the trained version will have a ZIP file available.

Follow these steps to download an already created package:

  1. In the ML Packages page, select an already created package from the list.
  2. In the Version tab, click on the icon of the package.
  3. Click Download.

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. This information is needed to map the downloaded package to the right one in the new environment.

Deleting ML packages

Packages can only be deleted if they are not deployed within a skill and no pipelines are currently running on those packages.

  1. In the ML Packages page, click ⁝ next to a package and select Delete undeployed versions. A confirmation window is displayed.
  2. In the confirmation window, click OK to delete all undeployed versions of the selected package. If a package version is part of a skill (it is active), it is NOT going to be deleted. If all the versions are inactive, they are all deleted.

OR

  1. In the ML Package > [ML Package Name] page Version tab, click ⁝ next to a package version and select Delete. A confirmation window is displayed.
  2. In the confirmation window, click OK to delete the selected version of the package. If a package version is part of a skill (it is active), it is NOT going to be deleted. If this is the only version for the selected package, the package itself is also deleted.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.