Skip to content

Commit

Permalink
refactor: update demo notebooks to use default raycluster image in de…
Browse files Browse the repository at this point in the history
…mo nbs
  • Loading branch information
dimakis committed Nov 9, 2023
1 parent 3398477 commit 49f573d
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 7 deletions.
4 changes: 3 additions & 1 deletion demo-notebooks/additional-demos/hf_interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@
"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 AppWrapper)."
"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 AppWrapper).\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 but we have a community image available for you to use if you wish."
]
},
{
Expand Down
13 changes: 12 additions & 1 deletion demo-notebooks/additional-demos/local_interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,18 @@
"cluster_name = \"hfgputest-1\"\n",
"local_interactive = True\n",
"\n",
"cluster = Cluster(ClusterConfiguration(local_interactive=local_interactive, namespace=namespace, name=cluster_name, num_workers=1, min_cpus=1, max_cpus=1, min_memory=4, max_memory=4, num_gpus=0, instascale=False, machine_types=[\"m5.xlarge\", \"p3.8xlarge\"]))"
"cluster = Cluster(ClusterConfiguration(local_interactive=local_interactive,\n",
" namespace=namespace,\n",
" name=cluster_name,\n",
" num_workers=1,\n",
" min_cpus=1,\n",
" max_cpus=1,\n",
" min_memory=4,\n",
" max_memory=4,\n",
" num_gpus=0,\n",
" image=\"quay.io/project-codeflare/ray:latest-py39-cu118\", #current default\n",
" instascale=False,\n",
" machine_types=[\"m5.xlarge\", \"p3.8xlarge\"]))"
]
},
{
Expand Down
6 changes: 4 additions & 2 deletions demo-notebooks/guided-demos/0_basic_ray.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
"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 AppWrapper)."
"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 AppWrapper).\n",
"\n",
"We must specify the image which will be used in our RayCluster, we recommend you bring your own image which suits your purposes but we have a community image available for you to use if you wish."
]
},
{
Expand Down Expand Up @@ -191,7 +193,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
"version": "3.9.18"
},
"vscode": {
"interpreter": {
Expand Down
5 changes: 4 additions & 1 deletion demo-notebooks/guided-demos/1_basic_instascale.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
"id": "bc27f84c",
"metadata": {},
"source": [
"This time, we are working in a cloud environment, and our OpenShift cluster does not have the resources needed for our desired workloads. We will use InstaScale to dynamically scale-up guaranteed resources based on our request (that will also automatically scale-down when we are finished working):"
"This time, we are working in a cloud environment, and our OpenShift cluster does not have the resources needed for our desired workloads. We will use InstaScale to dynamically scale-up guaranteed resources based on our request (that will also automatically scale-down when we are finished working):\n",
"\n",
"We must specify the image which will be used in our RayCluster, we recommend you bring your own image which suits your purposes but we have a community image available for you to use if you wish."
]
},
{
Expand All @@ -63,6 +65,7 @@
" min_memory=8,\n",
" max_memory=8,\n",
" num_gpus=1,\n",
" image=\"quay.io/project-codeflare/ray:latest-py39-cu118\", #current default\n",
" instascale=True, # InstaScale now enabled, will scale OCP cluster to guarantee resource request\n",
" machine_types=[\"m5.xlarge\", \"g4dn.xlarge\"] # Head, worker AWS machine types desired\n",
"))"
Expand Down
5 changes: 4 additions & 1 deletion demo-notebooks/guided-demos/2_basic_jobs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
"id": "bc27f84c",
"metadata": {},
"source": [
"Let's start by running through the same cluster setup as before:"
"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 but we have a community image available for you to use if you wish."
]
},
{
Expand All @@ -63,6 +65,7 @@
" min_memory=4,\n",
" max_memory=4,\n",
" num_gpus=0,\n",
" image=\"quay.io/project-codeflare/ray:latest-py39-cu118\", #current default\n",
" instascale=False\n",
"))"
]
Expand Down
5 changes: 4 additions & 1 deletion demo-notebooks/guided-demos/3_basic_interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
"id": "bc27f84c",
"metadata": {},
"source": [
"Once again, let's start by running through the same cluster setup as before:"
"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 but we have a community image available for you to use if you wish."
]
},
{
Expand All @@ -63,6 +65,7 @@
" min_memory=8,\n",
" max_memory=8,\n",
" num_gpus=1,\n",
" image=\"quay.io/project-codeflare/ray:latest-py39-cu118\", #current default\n",
" instascale=True, #<---instascale enabled\n",
" machine_types=[\"m5.xlarge\", \"g4dn.xlarge\"]\n",
" \n",
Expand Down
9 changes: 9 additions & 0 deletions demo-notebooks/guided-demos/4_gpt.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@
"auth.login()"
]
},
{
"cell_type": "markdown",
"id": "8f4b200f",
"metadata": {},
"source": [
"NOTE: We must specify the image which will be used in our RayCluster, we recommend you bring your own image which suits your purposes but we have a community image available for you to use if you wish."
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -46,6 +54,7 @@
" min_memory=8,\n",
" max_memory=8,\n",
" num_gpus=1,\n",
" image=\"quay.io/project-codeflare/ray:latest-py39-cu118\", #current default\n",
" instascale=True, #<---instascale enabled\n",
" machine_types=[\"m5.xlarge\", \"g4dn.xlarge\"],\n",
"))"
Expand Down

0 comments on commit 49f573d

Please sign in to comment.