clearml-docs/docs/webapp/resource_policies.md
2024-06-20 18:39:44 +03:00

6.1 KiB
Raw Blame History

title
Resource Policies

:::note ENTERPRISE FEATURE This feature is available under the ClearML Enterprise plan :::

Resource policies let administrators define user group resource quotas and reservations to enable workload prioritization across available resources.

Administrators make the allocated resources available to users through designated execution queues, each matching a specific resource consumption profile (i.e. the amount of resources allocated to jobs run through the queue).

Workspace administrators can use the resource policy manager to create, modify or delete resource policies: Set resource reservation and limits for user groups

  • Connect resource profiles to a policy, making them available to its user group via ClearML queues
  • Non-administrator users can see the resource policies currently applied to them.

Create a Policy

To create a policy:

  1. Click +
  2. In the Create Resource Policy modal, fill in the following:
    • Name - Resource policy name. This name will appear on the Policies list
    • Reservation - The number of resources guaranteed to be available for the policys users
    • Limit - The maximum amount of resources that jobs run through this policys queues can concurrently use.
    • User Group - The User groups to which the policy applies
    • Description - Optional free form text for additional descriptive information
  3. Click Add

Once the policy is defined, you can connect profiles to it (Resource profiles are defined in the Resource Configuration settings page, available to administrators). Resource profiles serve as an interface for resource policies to provide users with access to the available resource pools based on their job resource requirements (i.e. a job running through a profile is allocated the profiles defined amount of resources).

To connect a resource profile to a policy:

  1. In the policys details panel, click Edit
  2. Click Connect Profile
  3. In the Connect Profile modal, input the following information:
    • Queue name - The name for the ClearML queue the policys users will use to enqueue jobs using this resource profile. Jobs enqueued to this queue will be allocated the number of resources defined for its profile
    • Profile - select the resource profile.
  4. Click Connect

:::note Available Profiles Only profiles that are part of the currently provisioned resource configuration are available for selection (Profiles that are part of a configuration that has been saved but not yet provisioned will not appear in the list).

Profiles whose resource requirement exceeds the policy's resource limit will appear in the list but are not available for selection. :::

Policy Details

The policy details panel displays:

  • Policy quota and reservation
  • Resource profiles associated with the policy
  • Queues the policy makes available
  • Number of current jobs in each profile (pending or running)

The top card displays the policy information:

  • Policy name
  • Current usage - The number of resources currently in use (i.e. by currently running jobs)
  • Reserved resources
  • Resource limit
  • User group that the policy applies to - click to show list of users in the group

Resource policy card

The cards below the policy card display the profiles that are connected to the policy:

  • Resource profile name
  • Number of resources - Number of resources consumed by each job enqueued through this profile's queue
  • Queued jobs - Currently queued jobs
  • Running jobs - Currently running jobs

Resource profile card non-admin view

Administrators can also see each resource profiles resource pool links listed in order of routing priority.

Resource profile card admin view

The arrow connecting the policy card with a profile card is labeled with the name of the queue the policys users should use to run tasks through that resource profile.

Modify Policy

To modify a resource policy, click Edit to open the details panel in editor mode.

To Modify Policy Parameters

  1. On the resource policy card, click Menu > Edit
  2. In the Edit Resource Policy modal, you can modify the policys name, number of reserved resources, resource limit, and description
  3. Click Save

To Add a Resource Profile to a Policy

  1. Click Connect Profile
  2. In the Connect Profile modal, input the following information:
    • Queue name - The name for the ClearML queue the policys users will use to enqueue jobs using this resource profile. Jobs enqueued to this queue will be allocated the number of resources defined for its profile
    • Profile - select the resource profile. Note that you will only be able to connect profiles that have not already been connected to the policy
  3. Click Connect

To Remove a Resource Profile

To remove a resource profile: On the relevant resource profile box, click X.

Remove resource profile

Removing a profile from a policy will also delete the queue which made this profile available to the policys users. Any tasks enqueued on this queue will be set to draft status.

Click Exit to close editor mode

Delete Policy

To delete a resource policy

  1. Click Edit to open the details panel in editor mode
  2. On the resource policy box, click Menu
  3. Click Delete

Deleting a policy also deletes its queues (i.e. the queues to access the resource profiles). Additionally, any pending tasks will be dequeued.