Skip to content

Commit

Permalink
Add GPU to ClusterConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
oksanabaza committed May 7, 2024
1 parent a9b314e commit 4cdb19b
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions demo-notebooks/additional-demos/hf_interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"# Create our cluster and submit\n",
"# The SDK will try to find the name of your default local queue based on the annotation \"kueue.x-k8s.io/default-queue\": \"true\" unless you specify the local queue manually below\n",
"cluster = Cluster(ClusterConfiguration(name='hfgputest', \n",
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
" namespace=\"default\", # Update to your namespace\n",
" num_workers=1,\n",
" min_cpus=8, \n",
Expand Down
1 change: 1 addition & 0 deletions demo-notebooks/additional-demos/local_interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"\n",
"cluster = Cluster(ClusterConfiguration(namespace=namespace,\n",
" name=cluster_name,\n",
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
" num_workers=1,\n",
" min_cpus=1,\n",
" max_cpus=1,\n",
Expand Down
3 changes: 2 additions & 1 deletion demo-notebooks/guided-demos/0_basic_ray.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"# Create and configure our cluster object\n",
"# The SDK will try to find the name of your default local queue based on the annotation \"kueue.x-k8s.io/default-queue\": \"true\" unless you specify the local queue manually below\n",
"cluster = Cluster(ClusterConfiguration(\n",
" name='raytest',\n",
" name='raytest', \n",
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
" namespace='default', # Update to your namespace\n",
" num_workers=2,\n",
" min_cpus=1,\n",
Expand Down
1 change: 1 addition & 0 deletions demo-notebooks/guided-demos/2_basic_interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"cluster_name = \"interactivetest\"\n",
"cluster = Cluster(ClusterConfiguration(\n",
" name=cluster_name,\n",
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
" namespace=namespace,\n",
" num_workers=2,\n",
" min_cpus=2,\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"# The SDK will try to find the name of your default local queue based on the annotation \"kueue.x-k8s.io/default-queue\": \"true\" unless you specify the local queue manually below\n",
"cluster = Cluster(ClusterConfiguration(\n",
" name='raytest',\n",
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
" namespace='default', # Update to your namespace\n",
" num_workers=2,\n",
" min_cpus=1,\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"cluster_name = \"interactivetest\"\n",
"cluster = Cluster(ClusterConfiguration(\n",
" name=cluster_name,\n",
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
" namespace=namespace,\n",
" num_workers=2,\n",
" min_cpus=2,\n",
Expand Down
1 change: 1 addition & 0 deletions demo-notebooks/guided-demos/preview_nbs/0_basic_ray.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"# The SDK will try to find the name of your default local queue based on the annotation \"kueue.x-k8s.io/default-queue\": \"true\" unless you specify the local queue manually below\n",
"cluster = Cluster(ClusterConfiguration(\n",
" name='raytest',\n",
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
" namespace='default', # Update to your namespace\n",
" num_workers=2,\n",
" min_cpus=1,\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"cluster_name = \"interactivetest\"\n",
"cluster = Cluster(ClusterConfiguration(\n",
" name=cluster_name,\n",
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
" namespace=namespace,\n",
" num_workers=2,\n",
" min_cpus=2,\n",
Expand Down

0 comments on commit 4cdb19b

Please sign in to comment.