ray.serve.config.GangSchedulingConfig#

pydantic model ray.serve.config.GangSchedulingConfig[source]#

Configuration for gang scheduling of deployment replicas.

PublicAPI (alpha): This API is in alpha and may change before becoming stable.

field gang_placement_strategy: GangPlacementStrategy = GangPlacementStrategy.PACK#

Placement strategy for replicas within a gang. Options: PACK (pack with best effort, default), SPREAD (maximize availability).

field gang_size: int [Required]#

Number of replicas per gang. num_replicas must be a multiple of gang_size.

Constraints:
  • ge = 1

field runtime_failure_policy: GangRuntimeFailurePolicy = GangRuntimeFailurePolicy.RESTART_GANG#

What to do when a replica fails after gang is running. RESTART_GANG: kill and restart entire gang atomically. RESTART_REPLICA: kill and restart individual replica.