Skip to content

Commit 95b2165

Browse files
Ygnasopenshift-merge-bot[bot]
authored andcommitted
Update notebooks and docs with updated Cluster Configuration args
1 parent ee307a9 commit 95b2165

13 files changed

+79
-80
lines changed

demo-notebooks/additional-demos/hf_interactive.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@
9191
"# 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",
9292
"cluster_name= \"hfgputest\"\n",
9393
"cluster = Cluster(ClusterConfiguration(name=cluster_name, \n",
94-
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
95-
" num_gpus=1,\n",
94+
" head_extended_resource_requests={'nvidia.com/gpu':1}, # For GPU enabled workloads set the head_extended_resource_requests and worker_extended_resource_requests\n",
95+
" worker_extended_resource_requests={'nvidia.com/gpu':1},\n",
9696
" num_workers=1,\n",
97-
" min_cpus=8, \n",
98-
" max_cpus=8, \n",
99-
" min_memory=16, \n",
100-
" max_memory=16, \n",
97+
" worker_cpu_requests=8, \n",
98+
" worker_cpu_limits=8, \n",
99+
" worker_memory_requests=16, \n",
100+
" worker_memory_limits=16, \n",
101101
" # image=\"\", # Optional Field \n",
102102
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
103103
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",

demo-notebooks/additional-demos/local_interactive.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@
5454
"\n",
5555
"cluster = Cluster(ClusterConfiguration(\n",
5656
" name=cluster_name,\n",
57-
" head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n",
58-
" num_gpus=0,\n",
57+
" head_extended_resource_requests={'nvidia.com/gpu':0}, # For GPU enabled workloads set the head_extended_resource_requests and worker_extended_resource_requests\n",
58+
" worker_extended_resource_requests={'nvidia.com/gpu':0},\n",
5959
" num_workers=1,\n",
60-
" min_cpus=1,\n",
61-
" max_cpus=1,\n",
62-
" min_memory=4,\n",
63-
" max_memory=4,\n",
60+
" worker_cpu_requests=1,\n",
61+
" worker_cpu_limits=1,\n",
62+
" worker_memory_requests=4,\n",
63+
" worker_memory_limits=4,\n",
6464
" # image=\"\", # Optional Field \n",
6565
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
6666
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",

demo-notebooks/additional-demos/ray_job_client.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@
5555
"# 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",
5656
"cluster = Cluster(ClusterConfiguration(\n",
5757
" name='jobtest',\n",
58-
" head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n",
59-
" num_gpus=0,\n",
58+
" head_extended_resource_requests={'nvidia.com/gpu':0}, # For GPU enabled workloads set the head_extended_resource_requests and worker_extended_resource_requests\n",
59+
" worker_extended_resource_requests={'nvidia.com/gpu':0},\n",
6060
" num_workers=2,\n",
61-
" min_cpus=1,\n",
62-
" max_cpus=1,\n",
63-
" min_memory=4,\n",
64-
" max_memory=4,\n",
61+
" worker_cpu_requests=1,\n",
62+
" worker_cpu_limits=1,\n",
63+
" worker_memory_requests=4,\n",
64+
" worker_memory_limits=4,\n",
6565
" # image=\"\", # Optional Field \n",
6666
" write_to_file=False # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
6767
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",

demo-notebooks/guided-demos/0_basic_ray.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@
6464
" name='raytest', \n",
6565
" head_cpus='500m',\n",
6666
" head_memory=2,\n",
67-
" head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n",
68-
" num_gpus=0,\n",
67+
" head_extended_resource_requests={'nvidia.com/gpu':0}, # For GPU enabled workloads set the head_extended_resource_requests and worker_extended_resource_requests\n",
68+
" worker_extended_resource_requests={'nvidia.com/gpu':0},\n",
6969
" num_workers=2,\n",
70-
" min_cpus='250m',\n",
71-
" max_cpus=1,\n",
72-
" min_memory=4,\n",
73-
" max_memory=4,\n",
70+
" worker_cpu_requests='250m',\n",
71+
" worker_cpu_limits=1,\n",
72+
" worker_memory_requests=4,\n",
73+
" worker_memory_limits=4,\n",
7474
" # image=\"\", # Optional Field \n",
7575
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
7676
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",

demo-notebooks/guided-demos/1_cluster_job_client.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@
5757
" name='jobtest',\n",
5858
" head_cpus=1,\n",
5959
" head_memory=4,\n",
60-
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
61-
" num_gpus=1,\n",
60+
" head_extended_resource_requests={'nvidia.com/gpu':1}, # For GPU enabled workloads set the head_extended_resource_requests and worker_extended_resource_requests\n",
61+
" worker_extended_resource_requests={'nvidia.com/gpu':1},\n",
6262
" num_workers=2,\n",
63-
" min_cpus='250m',\n",
64-
" max_cpus=1,\n",
65-
" min_memory=4,\n",
66-
" max_memory=4,\n",
63+
" worker_cpu_requests='250m',\n",
64+
" worker_cpu_limits=1,\n",
65+
" worker_memory_requests=4,\n",
66+
" worker_memory_limits=4,\n",
6767
" # image=\"\", # Optional Field \n",
6868
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
6969
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",

demo-notebooks/guided-demos/2_basic_interactive.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@
6262
" name=cluster_name,\n",
6363
" head_cpus=1,\n",
6464
" head_memory=6,\n",
65-
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
66-
" num_gpus=1,\n",
65+
" head_extended_resource_requests={'nvidia.com/gpu':1}, # For GPU enabled workloads set the head_extended_resource_requests and worker_extended_resource_requests\n",
66+
" worker_extended_resource_requests={'nvidia.com/gpu':1},\n",
6767
" num_workers=2,\n",
68-
" min_cpus='250m',\n",
69-
" max_cpus=1,\n",
70-
" min_memory=4,\n",
71-
" max_memory=6,\n",
68+
" worker_cpu_requests='250m',\n",
69+
" worker_cpu_limits=1,\n",
70+
" worker_memory_requests=4,\n",
71+
" worker_memory_limits=6,\n",
7272
" # image=\"\", # Optional Field \n",
7373
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
7474
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",

demo-notebooks/guided-demos/notebook-ex-outputs/0_basic_ray.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@
7070
"# 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",
7171
"cluster = Cluster(ClusterConfiguration(\n",
7272
" name='raytest',\n",
73-
" head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n",
74-
" num_gpus=0,\n",
73+
" head_extended_resource_requests={'nvidia.com/gpu':0}, # For GPU enabled workloads set the head_extended_resource_requests and worker_extended_resource_requests\n",
74+
" worker_extended_resource_requests={'nvidia.com/gpu':0},\n",
7575
" num_workers=2,\n",
76-
" min_cpus=1,\n",
77-
" max_cpus=1,\n",
78-
" min_memory=4,\n",
79-
" max_memory=4,\n",
76+
" worker_cpu_requests=1,\n",
77+
" worker_cpu_limits=1,\n",
78+
" worker_memory_requests=4,\n",
79+
" worker_memory_limits=4,\n",
8080
" # image=\"\", # Optional Field \n",
8181
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
8282
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",

demo-notebooks/guided-demos/notebook-ex-outputs/1_cluster_job_client.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@
5555
"# 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",
5656
"cluster = Cluster(ClusterConfiguration(\n",
5757
" name='jobtest',\n",
58-
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
59-
" num_gpus=1,\n",
58+
" head_extended_resource_requests={'nvidia.com/gpu':1}, # For GPU enabled workloads set the head_extended_resource_requests and worker_extended_resource_requests\n",
59+
" worker_extended_resource_requests={'nvidia.com/gpu':1},\n",
6060
" num_workers=2,\n",
61-
" min_cpus=1,\n",
62-
" max_cpus=1,\n",
63-
" min_memory=4,\n",
64-
" max_memory=4,\n",
61+
" worker_cpu_requests=1,\n",
62+
" worker_cpu_limits=1,\n",
63+
" worker_memory_requests=4,\n",
64+
" worker_memory_limits=4,\n",
6565
" # image=\"\", # Optional Field \n",
6666
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
6767
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",

demo-notebooks/guided-demos/notebook-ex-outputs/2_basic_interactive.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@
6868
"cluster_name = \"interactivetest\"\n",
6969
"cluster = Cluster(ClusterConfiguration(\n",
7070
" name=cluster_name,\n",
71-
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
72-
" num_gpus=1,\n",
71+
" head_extended_resource_requests={'nvidia.com/gpu':1}, # For GPU enabled workloads set the head_extended_resource_requests and worker_extended_resource_requests\n",
72+
" worker_extended_resource_requests={'nvidia.com/gpu':1},\n",
7373
" num_workers=2,\n",
74-
" min_cpus=2,\n",
75-
" max_cpus=2,\n",
76-
" min_memory=8,\n",
77-
" max_memory=8,\n",
74+
" worker_cpu_requests=2,\n",
75+
" worker_cpu_limits=2,\n",
76+
" worker_memory_requests=8,\n",
77+
" worker_memory_limits=8,\n",
7878
" # image=\"\", # Optional Field \n",
7979
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
8080
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",

demo-notebooks/guided-demos/preview_nbs/0_basic_ray.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@
6262
"# 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",
6363
"cluster = Cluster(ClusterConfiguration(\n",
6464
" name='raytest',\n",
65-
" head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n",
66-
" num_gpus=0,\n",
65+
" head_extended_resource_requests={'nvidia.com/gpu':0}, # For GPU enabled workloads set the head_extended_resource_requests and worker_extended_resource_requests\n",
66+
" worker_extended_resource_requests={'nvidia.com/gpu':0},\n",
6767
" num_workers=2,\n",
68-
" min_cpus=1,\n",
69-
" max_cpus=1,\n",
70-
" min_memory=4,\n",
71-
" max_memory=4,\n",
68+
" worker_cpu_requests=1,\n",
69+
" worker_cpu_limits=1,\n",
70+
" worker_memory_requests=4,\n",
71+
" worker_memory_limits=4,\n",
7272
" # image=\"\", # Optional Field \n",
7373
" write_to_file=False, # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n",
7474
" # local_queue=\"local-queue-name\" # Specify the local queue manually\n",

0 commit comments

Comments
 (0)