Skip to content

ClusterAutoPatchConfig

Source code in docs_src/capo_sagemaker/types/cluster_auto_patch_config.py
class ClusterAutoPatchConfig(TypedDict, closed=True):
    patching_strategy: (
        "capo_sagemaker.types.cluster_patching_strategy.ClusterPatchingStrategy"
    )
    """<p>The strategy for applying patches to instances in the group.</p> <ul> <li> <p> <code>WhenIdle</code>: Cordons all instances and patches each instance as it becomes idle (no running jobs). Each instance is uncordoned immediately after patching and becomes available for new jobs. If instances do not become idle, they remain on the previous AMI version. You can then use UpdateClusterSoftware with the desired ImageReleaseVersion to manually update the remaining instances.</p> </li> <li> <p> <code>WhenAllIdle</code>: Cordons all instances and waits for all to become idle before patching. All instances are uncordoned after patching completes. If not all instances become idle, no patching occurs and all instances remain on the previous AMI version.</p> </li> <li> <p> <code>DrainFirst</code>: Designed for workloads that never become idle, such as inference. Cordons instances, evicts the running pods, and then patches each instance in batches. Each instance is uncordoned after patching. Use <code>DrainPolicy</code> to control how long to wait for pods to drain and what happens if the drain times out. Requires <code>MaximumBatchSize</code> in <code>DeploymentConfig</code>. Available only for clusters that use Amazon EKS as the orchestrator.</p> </li> </ul>"""
    patch_schedule: NotRequired[
        "capo_sagemaker.types.cluster_patch_schedule.ClusterPatchSchedule"
    ]
    """<p>The schedule for automatic patching, including the next patch date.</p>"""
    deployment_config: NotRequired[
        "capo_sagemaker.types.deployment_configuration.DeploymentConfiguration"
    ]
    """<p>The deployment configuration for rolling patch updates, including rollback settings and batch sizes. Only applicable when using a rolling patching strategy.</p>"""
    idle_wait_window_in_seconds: NotRequired[
        "capo_sagemaker.types.idle_wait_window_in_seconds_value.IdleWaitWindowInSecondsValue"
    ]
    """<p>The maximum time, in seconds, that automatic patching waits for instances to become idle after a scheduled patch starts. Automatic patching uncordons instances that don't become idle within this window, and they remain on the previous AMI version. Valid values are from 3600 (1 hour) to 2160000 (25 days). The default is 86400 (24 hours). This setting applies only to the <code>WhenIdle</code> and <code>WhenAllIdle</code> strategies.</p>"""
    drain_policy: NotRequired[
        "capo_sagemaker.types.cluster_drain_policy.ClusterDrainPolicy"
    ]
    """<p>The policy that controls how pods are evicted from an instance before it is patched. Valid only when <code>PatchingStrategy</code> is <code>DrainFirst</code>.</p>"""

deployment_config instance-attribute

deployment_config: NotRequired[DeploymentConfiguration]

The deployment configuration for rolling patch updates, including rollback settings and batch sizes. Only applicable when using a rolling patching strategy.

drain_policy instance-attribute

drain_policy: NotRequired[ClusterDrainPolicy]

The policy that controls how pods are evicted from an instance before it is patched. Valid only when PatchingStrategy is DrainFirst.

idle_wait_window_in_seconds instance-attribute

idle_wait_window_in_seconds: NotRequired[IdleWaitWindowInSecondsValue]

The maximum time, in seconds, that automatic patching waits for instances to become idle after a scheduled patch starts. Automatic patching uncordons instances that don't become idle within this window, and they remain on the previous AMI version. Valid values are from 3600 (1 hour) to 2160000 (25 days). The default is 86400 (24 hours). This setting applies only to the WhenIdle and WhenAllIdle strategies.

patch_schedule instance-attribute

patch_schedule: NotRequired[ClusterPatchSchedule]

The schedule for automatic patching, including the next patch date.

patching_strategy instance-attribute

patching_strategy: ClusterPatchingStrategy

The strategy for applying patches to instances in the group.

  • WhenIdle: Cordons all instances and patches each instance as it becomes idle (no running jobs). Each instance is uncordoned immediately after patching and becomes available for new jobs. If instances do not become idle, they remain on the previous AMI version. You can then use UpdateClusterSoftware with the desired ImageReleaseVersion to manually update the remaining instances.

  • WhenAllIdle: Cordons all instances and waits for all to become idle before patching. All instances are uncordoned after patching completes. If not all instances become idle, no patching occurs and all instances remain on the previous AMI version.

  • DrainFirst: Designed for workloads that never become idle, such as inference. Cordons instances, evicts the running pods, and then patches each instance in batches. Each instance is uncordoned after patching. Use DrainPolicy to control how long to wait for pods to drain and what happens if the drain times out. Requires MaximumBatchSize in DeploymentConfig. Available only for clusters that use Amazon EKS as the orchestrator.