You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ClusterConfiguration should support tolerations #413
Run Ray clusters (especially the worker pods) on tainted nodes.
Description of Problem the Feature Should Solve
You cannot create a Ray cluster with tolerations using the CodeFlare SDK
cluster = Cluster(ClusterConfiguration(...))
Often, machine nodes are tainted to prevent unwanted workloads. This is especially the case in GPU nodes which are often tainted. In addition different nodes will have different sized gpus, which would also use taints to make sure the correct workers land on the correct nodes.
You might also want to add a toleration to the headGroupSpec
Describe the Solution You Would Like to See
Add worker_tolerations and head_tolderations as optional parameters for ClusterConfiguration
Since I've submitted this, I've come across the need to add other fields, such as nodeSelectors, schedulerName, annotations, etc to my ray clusters. As I don't think we can anticipate all the needs of the user, I think we should build in more flexibility into cluster creation. I'd like to be able to read the ray cluster specs and submit a python dictionary to update the ray cluster.
We could add two keyword arguments, one to provide the Pod template for the worker nodes, another one for the head node Pod template, using official Kubernetes Python client types so auto-complete works, e.g.:
Activity
cfchase commentedon May 31, 2024
Since I've submitted this, I've come across the need to add other fields, such as nodeSelectors, schedulerName, annotations, etc to my ray clusters. As I don't think we can anticipate all the needs of the user, I think we should build in more flexibility into cluster creation. I'd like to be able to read the ray cluster specs and submit a python dictionary to update the ray cluster.
For example
That way I could update not just tolerations, but any other field I need to change, such as nodeSelector or schedulerName
astefanutti commentedon Jun 19, 2024
I totally agree the current API design is not flexible enough.
I really like your suggestion to offer the option for users to provide their own patch.
We could try to be in line with the different patching mechanisms that are well known in Kubernetes already: https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/.
astefanutti commentedon Jun 20, 2024
We could add two keyword arguments, one to provide the Pod template for the worker nodes, another one for the head node Pod template, using official Kubernetes Python client types so auto-complete works, e.g.:
These types from https://github.com/kubernetes-client/python provides a
to_dictmethod that we could use to merge these user-provided templates.@cfchase let us know if that's close enough to what you had in mind.