From 69254ea9c73661fdfdb07bd113c94daed31d4df7 Mon Sep 17 00:00:00 2001 From: Hansini Karunarathne <107214435+hansinikarunarathne@users.noreply.github.com> Date: Tue, 30 Jul 2024 16:16:56 +0530 Subject: [PATCH] change ray version and enable auto scaling (#2821) * change ray version and enable auto scaling Signed-off-by: hansinikarunarathne <107214435+hansinikarunarathne@users.noreply.github.com> * fix a issue Signed-off-by: hansinikarunarathne <107214435+hansinikarunarathne@users.noreply.github.com> * Add autoscaler options to ray Signed-off-by: hansinikarunarathne <107214435+hansinikarunarathne@users.noreply.github.com> --------- Signed-off-by: hansinikarunarathne <107214435+hansinikarunarathne@users.noreply.github.com> --- contrib/ray/raycluster_example.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/contrib/ray/raycluster_example.yaml b/contrib/ray/raycluster_example.yaml index c147a75a69..0de4047263 100644 --- a/contrib/ray/raycluster_example.yaml +++ b/contrib/ray/raycluster_example.yaml @@ -1,15 +1,27 @@ -apiVersion: ray.io/v1alpha1 +apiVersion: ray.io/v1 kind: RayCluster metadata: name: kubeflow-raycluster spec: rayVersion: '2.23.0' + # If `enableInTreeAutoscaling` is true, the Autoscaler sidecar will be added to the Ray head pod. + enableInTreeAutoscaling: true + # `autoscalerOptions` is an OPTIONAL field specifying configuration overrides for the Ray Autoscaler. + # The example configuration shown below below represents the DEFAULT values. + # (You may delete autoscalerOptions if the defaults are suitable.) + autoscalerOptions: + # Default: Upscaling is not rate-limited. This mode adds new worker pods to handle increased workload as quiclky as possible. + upscalingMode: Default + # `idleTimeoutSeconds` is the number of seconds to wait before scaling down a worker pod which is not using Ray resources. + idleTimeoutSeconds: 60 # Ray head pod configuration headGroupSpec: # Kubernetes Service Type. serviceType: ClusterIP # The following params are used to complete the ray start: ray start --head --block --dashboard-host: '0.0.0.0' ... rayStartParams: + # Setting "num-cpus: 0" to avoid any Ray actors or tasks being scheduled on the Ray head Pod. + num-cpus: "0" dashboard-host: '0.0.0.0' block: 'true' # pod template