Updated on 2024-10-29 GMT+08:00

Priority of a Training Job

When using a dedicated resource pool for training jobs, you can set the job priority when creating a training job or adjust the priority when a job is in the Pending state for a long time. By adjusting the job priority, you can reduce the job queuing duration.

Overview

Some training tasks, such as unimportant tests or experiments, are of low priority. In this case, you need to prioritize training tasks (jobs). A task with a higher priority is queued earlier than a task with a lower priority.

You can adjust the job execution sequence by configuring the priority of training jobs to ensure normal running of important services at peak hours.

Constraints

  • You can set the priority of a training job only if it is created using a new-version dedicated resource pool.
  • The value ranges from 1 to 3. The default priority is 1, and the highest priority is 3. You can set the job priority to 1 or 2 by default. Once permission to set the highest priority is granted, you can set it to 1, 2, or 3.

Configuring the Priority

Set the priority when you create a training job. The value ranges from 1 to 3. The default priority is 1, and the highest priority is 3.

Changing the Priority

On the Training Jobs page, locate a training job in the Pending state and click in the Job Priority column. In the dialog box that appears, change the priority and click OK.

Figure 1 Changing the job priority

Assigning the Permission to Set the Highest Job Priority to an IAM User

You can set the job priority to 1 or 2 by default. Once permission to set the highest priority is granted, you can set it to 1, 2, or 3.

  1. Log in to the Huawei Cloud management console as a tenant user, hover the cursor over your username in the upper right corner, and choose Identity and Access Management from the drop-down list to switch to the IAM management console.
  2. On the IAM console, choose Permissions > Policies/Roles from the navigation pane, click Create Custom Policy in the upper right corner, and configure the following parameters.
    • Policy Name: Enter a custom policy name, for example, Allowing Users to Set the Highest Job Priority.
    • Policy View: Select Visual editor.
    • Policy Content: Select Allow, ModelArts Service, modelarts:trainJob:setHighPriority, and default resources.
  3. In the navigation pane, choose User Groups. Then, click Authorize in the Operation column of the target user group. On the Authorize User Group page, select the custom policies created in 2, and click Next. Then, select the scope and click OK.

    After the configuration, all users in the user group have the permission to use Cloud Shell to log in to a running training container.

    If no user group is available, create a user group, add users using the user group management function, and configure authorization. If the target user is not in a user group, you can add the user to a user group through the user group management function.