SageMaker / Client / create_cluster_scheduler_config

create_cluster_scheduler_config#

SageMaker.Client.create_cluster_scheduler_config(**kwargs)#

Create cluster policy configuration. This policy is used for task prioritization and fair-share allocation of idle compute. This helps prioritize critical workloads and distributes idle compute across entities.

See also: AWS API Documentation

Request Syntax

response = client.create_cluster_scheduler_config(
    Name='string',
    ClusterArn='string',
    SchedulerConfig={
        'PriorityClasses': [
            {
                'Name': 'string',
                'Weight': 123
            },
        ],
        'FairShare': 'Enabled'|'Disabled'
    },
    Description='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters:
  • Name (string) –

    [REQUIRED]

    Name for the cluster policy.

  • ClusterArn (string) –

    [REQUIRED]

    ARN of the cluster.

  • SchedulerConfig (dict) –

    [REQUIRED]

    Configuration about the monitoring schedule.

    • PriorityClasses (list) –

      List of the priority classes, PriorityClass, of the cluster policy. When specified, these class configurations define how tasks are queued.

      • (dict) –

        Priority class configuration. When included in PriorityClasses, these class configurations define how tasks are queued.

        • Name (string) – [REQUIRED]

          Name of the priority class.

        • Weight (integer) – [REQUIRED]

          Weight of the priority class. The value is within a range from 0 to 100, where 0 is the default.

          A weight of 0 is the lowest priority and 100 is the highest. Weight 0 is the default.

    • FairShare (string) –

      When enabled, entities borrow idle compute based on their assigned FairShareWeight.

      When disabled, entities borrow idle compute based on a first-come first-serve basis.

      Default is Enabled.

  • Description (string) – Description of the cluster policy.

  • Tags (list) –

    Tags of the cluster policy.

    • (dict) –

      A tag object that consists of a key and an optional value, used to manage metadata for SageMaker Amazon Web Services resources.

      You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to SageMaker resources, see AddTags.

      For more information on adding metadata to your Amazon Web Services resources with tagging, see Tagging Amazon Web Services resources. For advice on best practices for managing Amazon Web Services resources with tagging, see Tagging Best Practices: Implement an Effective Amazon Web Services Resource Tagging Strategy.

      • Key (string) – [REQUIRED]

        The tag key. Tag keys must be unique per resource.

      • Value (string) – [REQUIRED]

        The tag value.

Return type:

dict

Returns:

Response Syntax

{
    'ClusterSchedulerConfigArn': 'string',
    'ClusterSchedulerConfigId': 'string'
}

Response Structure

  • (dict) –

    • ClusterSchedulerConfigArn (string) –

      ARN of the cluster policy.

    • ClusterSchedulerConfigId (string) –

      ID of the cluster policy.

Exceptions