From e6c7594e17deeadf04936973e2503210000c4b48 Mon Sep 17 00:00:00 2001 From: Shilpa Chugh Date: Thu, 18 Jul 2024 13:03:00 +0530 Subject: [PATCH] Make ray image parameter as optional --- .../additional-demos/hf_interactive.ipynb | 6 +++--- .../additional-demos/local_interactive.ipynb | 6 +++--- .../additional-demos/ray_job_client.ipynb | 13 ++++++++++++- demo-notebooks/guided-demos/0_basic_ray.ipynb | 6 +++--- .../guided-demos/1_cluster_job_client.ipynb | 13 ++++++++++++- .../guided-demos/2_basic_interactive.ipynb | 6 +++--- .../notebook-ex-outputs/0_basic_ray.ipynb | 6 +++--- .../notebook-ex-outputs/1_cluster_job_client.ipynb | 13 ++++++++++++- .../notebook-ex-outputs/2_basic_interactive.ipynb | 6 +++--- .../guided-demos/preview_nbs/0_basic_ray.ipynb | 6 +++--- .../preview_nbs/1_cluster_job_client.ipynb | 13 ++++++++++++- .../preview_nbs/2_basic_interactive.ipynb | 6 +++--- docs/cluster-configuration.md | 3 ++- 13 files changed, 74 insertions(+), 29 deletions(-) diff --git a/demo-notebooks/additional-demos/hf_interactive.ipynb b/demo-notebooks/additional-demos/hf_interactive.ipynb index ad5524513..668c72091 100644 --- a/demo-notebooks/additional-demos/hf_interactive.ipynb +++ b/demo-notebooks/additional-demos/hf_interactive.ipynb @@ -68,8 +68,8 @@ "source": [ "Here, we want to define our cluster by specifying the resources we require for our batch workload. Below, we define our cluster object (which generates a corresponding Ray Cluster).\n", "\n", - "NOTE: We must specify the `image` which will be used in our RayCluster, we recommend you bring your own image which suits your purposes. \n", - "The example here is a community image." + "NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n", + "If you have your own Ray image which suits your purposes, specify it in image field to override the default image." ] }, { @@ -98,7 +98,7 @@ " max_cpus=8, \n", " min_memory=16, \n", " max_memory=16, \n", - " image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n", + " # image=\"\", # Optional Field \n", " write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n", " # local_queue=\"local-queue-name\" # Specify the local queue manually\n", " ))" diff --git a/demo-notebooks/additional-demos/local_interactive.ipynb b/demo-notebooks/additional-demos/local_interactive.ipynb index 1d3c83ad2..bbfe6cb0b 100644 --- a/demo-notebooks/additional-demos/local_interactive.ipynb +++ b/demo-notebooks/additional-demos/local_interactive.ipynb @@ -35,8 +35,8 @@ "metadata": {}, "source": [ "\n", - "NOTE: We must specify the `image` which will be used in our RayCluster, we recommend you bring your own image which suits your purposes. \n", - "The example here is a community image." + "NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n", + "If you have your own Ray image which suits your purposes, specify it in image field to override the default image." ] }, { @@ -62,7 +62,7 @@ " max_cpus=1,\n", " min_memory=4,\n", " max_memory=4,\n", - " image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n", + " # image=\"\", # Optional Field \n", " write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n", " # local_queue=\"local-queue-name\" # Specify the local queue manually\n", " ))" diff --git a/demo-notebooks/additional-demos/ray_job_client.ipynb b/demo-notebooks/additional-demos/ray_job_client.ipynb index c452fb31e..594817ef0 100644 --- a/demo-notebooks/additional-demos/ray_job_client.ipynb +++ b/demo-notebooks/additional-demos/ray_job_client.ipynb @@ -35,6 +35,16 @@ "auth.login()" ] }, + { + "cell_type": "markdown", + "id": "18de2d65", + "metadata": {}, + "source": [ + "\n", + "NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n", + "If you have your own Ray image which suits your purposes, specify it in image field to override the default image." + ] + }, { "cell_type": "code", "execution_count": null, @@ -53,8 +63,9 @@ " max_cpus=1,\n", " min_memory=4,\n", " max_memory=4,\n", - " image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n", + " # image=\"\", # Optional Field \n", " write_to_file=False # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n", + " # local_queue=\"local-queue-name\" # Specify the local queue manually\n", "))" ] }, diff --git a/demo-notebooks/guided-demos/0_basic_ray.ipynb b/demo-notebooks/guided-demos/0_basic_ray.ipynb index 0cd3419f6..080b693b7 100644 --- a/demo-notebooks/guided-demos/0_basic_ray.ipynb +++ b/demo-notebooks/guided-demos/0_basic_ray.ipynb @@ -47,8 +47,8 @@ "source": [ "Here, we want to define our cluster by specifying the resources we require for our batch workload. Below, we define our cluster object (which generates a corresponding RayCluster).\n", "\n", - "NOTE: We must specify the `image` which will be used in our RayCluster, we recommend you bring your own image which suits your purposes. \n", - "The example here is a community image." + "NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n", + "If you have your own Ray image which suits your purposes, specify it in image field to override the default image." ] }, { @@ -70,7 +70,7 @@ " max_cpus=1,\n", " min_memory=4,\n", " max_memory=4,\n", - " image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n", + " # image=\"\", # Optional Field \n", " write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n", " # local_queue=\"local-queue-name\" # Specify the local queue manually\n", "))" diff --git a/demo-notebooks/guided-demos/1_cluster_job_client.ipynb b/demo-notebooks/guided-demos/1_cluster_job_client.ipynb index de8fafdd6..7db4c4ee2 100644 --- a/demo-notebooks/guided-demos/1_cluster_job_client.ipynb +++ b/demo-notebooks/guided-demos/1_cluster_job_client.ipynb @@ -34,6 +34,17 @@ "auth.login()" ] }, + { + "cell_type": "markdown", + "id": "bc27f84c", + "metadata": {}, + "source": [ + "Here, we want to define our cluster by specifying the resources we require for our batch workload. Below, we define our cluster object (which generates a corresponding RayCluster).\n", + "\n", + "NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n", + "If you have your own Ray image which suits your purposes, specify it in image field to override the default image." + ] + }, { "cell_type": "code", "execution_count": null, @@ -52,7 +63,7 @@ " max_cpus=1,\n", " min_memory=4,\n", " max_memory=4,\n", - " image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n", + " # image=\"\", # Optional Field \n", " write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n", " # local_queue=\"local-queue-name\" # Specify the local queue manually\n", "))" diff --git a/demo-notebooks/guided-demos/2_basic_interactive.ipynb b/demo-notebooks/guided-demos/2_basic_interactive.ipynb index b6a13b8c4..1ffc2acb4 100644 --- a/demo-notebooks/guided-demos/2_basic_interactive.ipynb +++ b/demo-notebooks/guided-demos/2_basic_interactive.ipynb @@ -44,8 +44,8 @@ "source": [ "Once again, let's start by running through the same cluster setup as before:\n", "\n", - "NOTE: We must specify the `image` which will be used in our RayCluster, we recommend you bring your own image which suits your purposes. \n", - "The example here is a community image." + "NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n", + "If you have your own Ray image which suits your purposes, specify it in image field to override the default image." ] }, { @@ -69,7 +69,7 @@ " max_cpus=2,\n", " min_memory=8,\n", " max_memory=8,\n", - " image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n", + " # image=\"\", # Optional Field \n", " write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n", " # local_queue=\"local-queue-name\" # Specify the local queue manually\n", "))" diff --git a/demo-notebooks/guided-demos/notebook-ex-outputs/0_basic_ray.ipynb b/demo-notebooks/guided-demos/notebook-ex-outputs/0_basic_ray.ipynb index 646e24242..4f96b0773 100644 --- a/demo-notebooks/guided-demos/notebook-ex-outputs/0_basic_ray.ipynb +++ b/demo-notebooks/guided-demos/notebook-ex-outputs/0_basic_ray.ipynb @@ -47,8 +47,8 @@ "source": [ "Here, we want to define our cluster by specifying the resources we require for our batch workload. Below, we define our cluster object (which generates a corresponding RayCluster).\n", "\n", - "NOTE: We must specify the `image` which will be used in our RayCluster, we recommend you bring your own image which suits your purposes. \n", - "The example here is a community image." + "NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n", + "If you have your own Ray image which suits your purposes, specify it in image field to override the default image." ] }, { @@ -78,7 +78,7 @@ " max_cpus=1,\n", " min_memory=4,\n", " max_memory=4,\n", - " image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n", + " # image=\"\", # Optional Field \n", " write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n", " # local_queue=\"local-queue-name\" # Specify the local queue manually\n", "))" diff --git a/demo-notebooks/guided-demos/notebook-ex-outputs/1_cluster_job_client.ipynb b/demo-notebooks/guided-demos/notebook-ex-outputs/1_cluster_job_client.ipynb index b2e954e21..86cc319b3 100644 --- a/demo-notebooks/guided-demos/notebook-ex-outputs/1_cluster_job_client.ipynb +++ b/demo-notebooks/guided-demos/notebook-ex-outputs/1_cluster_job_client.ipynb @@ -34,6 +34,17 @@ "auth.login()" ] }, + { + "cell_type": "markdown", + "id": "bc27f84c", + "metadata": {}, + "source": [ + "Here, we want to define our cluster by specifying the resources we require for our batch workload. Below, we define our cluster object (which generates a corresponding RayCluster).\n", + "\n", + "NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n", + "If you have your own Ray image which suits your purposes, specify it in image field to override the default image." + ] + }, { "cell_type": "code", "execution_count": null, @@ -52,7 +63,7 @@ " max_cpus=1,\n", " min_memory=4,\n", " max_memory=4,\n", - " image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n", + " # image=\"\", # Optional Field \n", " write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n", " # local_queue=\"local-queue-name\" # Specify the local queue manually\n", "))" diff --git a/demo-notebooks/guided-demos/notebook-ex-outputs/2_basic_interactive.ipynb b/demo-notebooks/guided-demos/notebook-ex-outputs/2_basic_interactive.ipynb index 443ea0633..f2af37df9 100644 --- a/demo-notebooks/guided-demos/notebook-ex-outputs/2_basic_interactive.ipynb +++ b/demo-notebooks/guided-demos/notebook-ex-outputs/2_basic_interactive.ipynb @@ -44,8 +44,8 @@ "source": [ "Once again, let's start by running through the same cluster setup as before:\n", "\n", - "NOTE: We must specify the `image` which will be used in our RayCluster, we recommend you bring your own image which suits your purposes. \n", - "The example here is a community image." + "NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n", + "If you have your own Ray image which suits your purposes, specify it in image field to override the default image." ] }, { @@ -77,7 +77,7 @@ " max_cpus=2,\n", " min_memory=8,\n", " max_memory=8,\n", - " image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n", + " # image=\"\", # Optional Field \n", " write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n", " # local_queue=\"local-queue-name\" # Specify the local queue manually\n", "))" diff --git a/demo-notebooks/guided-demos/preview_nbs/0_basic_ray.ipynb b/demo-notebooks/guided-demos/preview_nbs/0_basic_ray.ipynb index 82b279660..676d17763 100644 --- a/demo-notebooks/guided-demos/preview_nbs/0_basic_ray.ipynb +++ b/demo-notebooks/guided-demos/preview_nbs/0_basic_ray.ipynb @@ -47,8 +47,8 @@ "source": [ "Here, we want to define our cluster by specifying the resources we require for our batch workload. Below, we define our cluster object (which generates a corresponding RayCluster).\n", "\n", - "NOTE: We must specify the `image` which will be used in our RayCluster, we recommend you bring your own image which suits your purposes. \n", - "The example here is a community image." + "NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n", + "If you have your own Ray image which suits your purposes, specify it in image field to override the default image." ] }, { @@ -70,7 +70,7 @@ " max_cpus=1,\n", " min_memory=4,\n", " max_memory=4,\n", - " image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n", + " # image=\"\", # Optional Field \n", " write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n", " # local_queue=\"local-queue-name\" # Specify the local queue manually\n", "))" diff --git a/demo-notebooks/guided-demos/preview_nbs/1_cluster_job_client.ipynb b/demo-notebooks/guided-demos/preview_nbs/1_cluster_job_client.ipynb index 75a94d9ad..2a7638a3c 100644 --- a/demo-notebooks/guided-demos/preview_nbs/1_cluster_job_client.ipynb +++ b/demo-notebooks/guided-demos/preview_nbs/1_cluster_job_client.ipynb @@ -34,6 +34,17 @@ "auth.login()" ] }, + { + "cell_type": "markdown", + "id": "bc27f84c", + "metadata": {}, + "source": [ + "Here, we want to define our cluster by specifying the resources we require for our batch workload. Below, we define our cluster object (which generates a corresponding RayCluster).\n", + "\n", + "NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n", + "If you have your own Ray image which suits your purposes, specify it in image field to override the default image." + ] + }, { "cell_type": "code", "execution_count": null, @@ -52,7 +63,7 @@ " max_cpus=1,\n", " min_memory=4,\n", " max_memory=4,\n", - " image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n", + " # image=\"\", # Optional Field \n", " write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources\n", " # local_queue=\"local-queue-name\" # Specify the local queue manually\n", "))" diff --git a/demo-notebooks/guided-demos/preview_nbs/2_basic_interactive.ipynb b/demo-notebooks/guided-demos/preview_nbs/2_basic_interactive.ipynb index ceb8ebad7..6810c1c9c 100644 --- a/demo-notebooks/guided-demos/preview_nbs/2_basic_interactive.ipynb +++ b/demo-notebooks/guided-demos/preview_nbs/2_basic_interactive.ipynb @@ -44,8 +44,8 @@ "source": [ "Once again, let's start by running through the same cluster setup as before:\n", "\n", - "NOTE: We must specify the `image` which will be used in our RayCluster, we recommend you bring your own image which suits your purposes. \n", - "The example here is a community image." + "NOTE: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. \n", + "If you have your own Ray image which suits your purposes, specify it in image field to override the default image." ] }, { @@ -69,7 +69,7 @@ " max_cpus=2,\n", " min_memory=8,\n", " max_memory=8,\n", - " image=\"quay.io/rhoai/ray:2.23.0-py39-cu121\",\n", + " # image=\"\", # Optional Field \n", " write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n", " # local_queue=\"local-queue-name\" # Specify the local queue manually\n", "))" diff --git a/docs/cluster-configuration.md b/docs/cluster-configuration.md index c3af63439..40132894c 100644 --- a/docs/cluster-configuration.md +++ b/docs/cluster-configuration.md @@ -19,11 +19,12 @@ cluster = Cluster(ClusterConfiguration( min_memory=2, # Default 2 max_memory=2, # Default 2 num_gpus=0, # Default 0 - image="quay.io/rhoai/ray:2.23.0-py39-cu121", # Mandatory Field + # image="", # Optional Field machine_types=["m5.xlarge", "g4dn.xlarge"], labels={"exampleLabel": "example", "secondLabel": "example"}, )) ``` +Note: 'quay.io/rhoai/ray:2.23.0-py39-cu121' is the default community image used by the CodeFlare SDK for creating a RayCluster resource. If you have your own Ray image which suits your purposes, specify it in image field to override the default image. The `labels={"exampleLabel": "example"}` parameter can be used to apply additional labels to the RayCluster resource.