Help Center> ModelArts> AI Gallery> Publish & Share> Publishing a Free Algorithm
Updated on 2023-12-22 GMT+08:00

Publishing a Free Algorithm

In AI Gallery, you can share your algorithms with others for free.

Prerequisites

  • You have created an algorithm in Algorithm Management on the ModelArts console. For details about how to create an algorithm, see Creating an Algorithm.

    When creating an algorithm, ensure that the names of files and folders in the OBS bucket where the algorithm code is stored are unique. Otherwise, the algorithm may fail to be published. If the algorithm is published, the code fails to be opened.

Publishing an Algorithm

  1. On the AI Gallery home page, go to the Algorithm page.
  2. Click Publish. The Publish in AI Gallery is displayed.
  3. Configure parameters and click Publish.
    • Publishing a new version
      1. Set Publish Mode to Create Asset.
      2. Enter an item title which will be displayed in AI Gallery.
      3. Source defaults to ModelArts.
      4. Select a ModelArts region. Select a ModelArts region for using this asset.
      5. Click Select on the right of Algorithm Name, select the algorithm you want to publish, and click Confirm.
      6. Enter the asset version in the x.x.x format.
      7. Set Visible To.

        Options:

        • Public: indicates that all users who use AI Gallery can view and use this asset.
        • Specific users: indicates that only specified users can view and use this asset.
        • Only to me: indicates that only the current account can view and use this asset.
      8. Set Duration Limit.

        Set the free duration of the asset. This function is disabled by default, that is, subscribers can use the asset without duration limit. When this function is enabled, set the free duration of the asset and whether to renew the subscription after the asset expires.

    • Updating an existing version
      1. Set Publish Mode to Add asset version.
      2. Select an existing asset name from the Item Title drop-down list.
      3. Source defaults to ModelArts.
      4. Select a ModelArts region.
      5. Click Select on the right of Algorithm Name, select the target algorithm, and click Confirm.
      6. Enter a new version number in the Offering Version text box.
  4. Read and agree to Agreement for Publishing Digital Contents on Huawei Cloud AI Gallery and Service Agreement of AI Gallery.
  5. Click Publish.

    When you publish an asset imported using a container image, the backend performs asset security scanning. If the scanning detects any security issue, the asset will fail to be published and you will receive an email.

Editing Asset Details

After an asset is published, you can modify the title, cover, and description of the asset on the details page to attract attentions.

Modifying the cover and titles
  1. On the details page of the published asset, click Edit on the right, upload a new cover, and edit the titles.
  2. After editing is complete, click Save. The cover and titles are automatically synchronized. You can view the modification on the asset details page.
Figure 1 Modifying the cover and titles
Selecting categories
  1. Click on the right of Category. In the displayed edit box, select categories from the drop-down list.
  2. Click the check mark on the right of the edit box.

    The saved categories will be used as filter criteria on the asset search page.

Figure 2 Adding categories
Editing the description
  1. Click Edit on the right and enter the asset description in the text box, including but not limited to the background, introduction, usage method, and constraints. You can edit content in Markdown format.
  2. After the editing is complete, click Save.

Editing restrictions

You can modify the access policy and maximum duration of your published assets.

  1. Click the Restrictions tab and click Edit in the upper right corner.
    • Select the access policy from the drop-down list on the right of Visible To.
      • Public: indicates that all users who use AI Gallery can view and use this asset.
      • Specific users: indicates that only specified users can view and use this asset.
      • Only to me: indicates that only the current account can view and use this asset.

      Only permissions higher than the one set when you published your asset are allowed.

    • Maximum Duration can be disabled or enabled. When this function is enabled, set the duration of the asset and whether to renew the subscription after the asset expires.
  2. Click Save.
Figure 3 Editing restrictions
Editing versions
  1. Click the Version tab and click Edit in the upper right corner.
  2. On this page, modify the version description or click Discontinue in the Operation column of the target version to discontinue it. You can only discontinue a released asset that has two or more versions.
  3. Click Add Version on the right of the Version area. The Publish in AI Gallery is displayed. Add an asset version by referring to Updating an existing version.
  4. After editing is complete, click Save in the upper right corner.
Figure 4 Editing versions
Editing the paper
  1. On the Paper tab, click Edit in the upper right corner, and enter the paper name and URL in the text box. You can click the URL to view the paper details.
  2. After editing is complete, click Save.
Editing code
  1. On the Code tab, click Edit in the upper right corner to determine whether to open the code.

    If you discontinue an algorithm whose code is not open, the subscribers can continue using the algorithm before the subscription expires. After the algorithm is released again with its code open, the algorithm that has been discontinued is not displayed on the home page. You can choose My Gallery > My Assets > Algorithms > My Subscriptions and click the algorithm name to preview the code.

  2. If the code is open, set the license type.

    You can click the exclamation mark (!) next to a license type to view license details.

  3. After editing is complete, click Save.
Figure 5 Editing the code

Discontinuing an Algorithm

To discontinue a shared asset from AI Gallery, perform the following operations:

  1. In AI Gallery, choose . The My Algorithms page is displayed.
  2. On the My Algorithms > Published Algorithms page, click Discontinue on the right of the target asset. In the dialog box that is displayed, confirm the asset information and click OK.

    After an asset is discontinued, users who have subscribed to the asset can continue using it within the duration, but other users cannot view or subscribe to it.

    Figure 6 Discontinuing an asset

    After the asset is discontinued, Discontinue in the Operation column changes to Release. You can click Release to share a discontinued asset to AI Gallery.