Skip to content

Commit

Permalink
Make ray image parameter as optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Shilpa Chugh committed Jul 19, 2024
1 parent e7a45ba commit e6c7594
Show file tree
Hide file tree
Showing 13 changed files with 74 additions and 29 deletions.
6 changes: 3 additions & 3 deletions demo-notebooks/additional-demos/hf_interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand Down Expand Up @@ -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",
" ))"
Expand Down
6 changes: 3 additions & 3 deletions demo-notebooks/additional-demos/local_interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand All @@ -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",
" ))"
Expand Down
13 changes: 12 additions & 1 deletion demo-notebooks/additional-demos/ray_job_client.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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",
"))"
]
},
Expand Down
6 changes: 3 additions & 3 deletions demo-notebooks/guided-demos/0_basic_ray.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand All @@ -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",
"))"
Expand Down
13 changes: 12 additions & 1 deletion demo-notebooks/guided-demos/1_cluster_job_client.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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",
"))"
Expand Down
6 changes: 3 additions & 3 deletions demo-notebooks/guided-demos/2_basic_interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand All @@ -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",
"))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand Down Expand Up @@ -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",
"))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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",
"))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand Down Expand Up @@ -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",
"))"
Expand Down
6 changes: 3 additions & 3 deletions demo-notebooks/guided-demos/preview_nbs/0_basic_ray.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand All @@ -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",
"))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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",
"))"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand All @@ -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",
"))"
Expand Down
3 changes: 2 additions & 1 deletion docs/cluster-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit e6c7594

Please sign in to comment.