Ray Enhances Scheduling with New Label Selectors


Ray Enhances Scheduling with New Label Selectors


Terrill Dicki
Nov 01, 2025 13:41

Ray introduces label selectors, enhancing scheduling capabilities for developers, allowing more precise workload placement on nodes. The feature is a collaboration with Google Kubernetes Engine.

Ray, the distributed computing framework, has introduced a significant update with the release of label selectors, a feature aimed at enhancing scheduling flexibility for developers. This new capability allows for more precise placement of workloads on the appropriate nodes, according to a recent announcement by Anyscale.

Enhancing Workload Placement

The introduction of label selectors comes as part of a collaboration with the Google Kubernetes Engine team. Available in Ray version 2.49, the new feature is integrated across the Ray Dashboard, KubeRay, and Anyscale’s AI compute platform. It allows developers to assign specific labels to nodes in a Ray cluster, such as cpu-family=intel or market-type=spot, which can streamline the process of scheduling tasks, actors, or placement groups on specified nodes.

Addressing Previous Limitations

Previously, developers faced challenges when trying to schedule tasks on specific nodes, often resorting to workarounds that conflated resource quantities with placement constraints. The new label selectors address these limitations by allowing more flexible expression of scheduling requirements, including exact matches, any-of conditions, and negative matches, such as avoiding GPU nodes or specifying regions like us-west1-a or us-west1-b.

Integration with Kubernetes

Ray’s label selectors draw inspiration from Kubernetes labels and selectors, enhancing interoperability between the two systems. This development is part of ongoing efforts to integrate Ray more closely with Kubernetes, enabling more advanced use cases through familiar APIs and semantics.

Practical Applications

With label selectors, developers can achieve various scheduling objectives, such as pinning tasks to specific nodes, selecting CPU-only placements, targeting specific accelerators, and keeping workloads within certain regions or zones. The feature also supports both static and autoscaling clusters, with Anyscale’s autoscaler considering resource shapes and label selectors to scale worker groups appropriately.

Future Developments

Looking ahead, Ray plans to enhance the label selector feature with additional capabilities such as fallback label selectors, library support for common scheduling patterns, and improved interoperability with Kubernetes. These developments aim to further simplify workload scheduling and enhance the overall user experience.

For more detailed instructions and API details, developers can refer to the Anyscale and Ray guides.

Image source: Shutterstock




Source link