diff --git a/demo-notebooks/additional-demos/hf_interactive.ipynb b/demo-notebooks/additional-demos/hf_interactive.ipynb index 9181f3aac..9a362321b 100644 --- a/demo-notebooks/additional-demos/hf_interactive.ipynb +++ b/demo-notebooks/additional-demos/hf_interactive.ipynb @@ -93,12 +93,13 @@ "# 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", " namespace=\"default\", # Update to your namespace\n", + " head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n", + " num_gpus=1,\n", " num_workers=1,\n", " min_cpus=8, \n", " max_cpus=8, \n", " min_memory=16, \n", " max_memory=16, \n", - " num_gpus=4,\n", " image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\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 36adfb500..94e657a70 100644 --- a/demo-notebooks/additional-demos/local_interactive.ipynb +++ b/demo-notebooks/additional-demos/local_interactive.ipynb @@ -55,12 +55,13 @@ "\n", "cluster = Cluster(ClusterConfiguration(namespace=namespace,\n", " name=cluster_name,\n", + " head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n", + " num_gpus=0,\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\",\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 e3d90cd39..0182f1b32 100644 --- a/demo-notebooks/additional-demos/ray_job_client.ipynb +++ b/demo-notebooks/additional-demos/ray_job_client.ipynb @@ -46,12 +46,13 @@ "cluster = Cluster(ClusterConfiguration(\n", " name='jobtest',\n", " namespace='default', # Update to your namespace\n", + " head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n", + " num_gpus=0,\n", " num_workers=2,\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\",\n", " write_to_file=False # When enabled Ray Cluster yaml files are written to /HOME/.codeflare/resources \n", "))" diff --git a/demo-notebooks/guided-demos/0_basic_ray.ipynb b/demo-notebooks/guided-demos/0_basic_ray.ipynb index 6a3b37108..7dc9e8cd0 100644 --- a/demo-notebooks/guided-demos/0_basic_ray.ipynb +++ b/demo-notebooks/guided-demos/0_basic_ray.ipynb @@ -61,14 +61,15 @@ "# 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", " namespace='default', # Update to your namespace\n", + " head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n", + " num_gpus=0,\n", " num_workers=2,\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\",\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 787bd315d..608fbd2e2 100644 --- a/demo-notebooks/guided-demos/1_cluster_job_client.ipynb +++ b/demo-notebooks/guided-demos/1_cluster_job_client.ipynb @@ -45,13 +45,13 @@ "cluster = Cluster(ClusterConfiguration(\n", " name='jobtest',\n", " namespace='default', # Update to your namespace\n", + " head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n", + " num_gpus=1,\n", " num_workers=2,\n", " min_cpus=1,\n", " max_cpus=1,\n", " min_memory=4,\n", " max_memory=4,\n", - " num_gpus=1,\n", - " head_gpus=1,\n", " image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\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 943425a89..6cee82e1d 100644 --- a/demo-notebooks/guided-demos/2_basic_interactive.ipynb +++ b/demo-notebooks/guided-demos/2_basic_interactive.ipynb @@ -62,12 +62,13 @@ "cluster = Cluster(ClusterConfiguration(\n", " name=cluster_name,\n", " namespace=namespace,\n", + " head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n", + " num_gpus=1,\n", " num_workers=2,\n", " min_cpus=2,\n", " max_cpus=2,\n", " min_memory=8,\n", " max_memory=8,\n", - " num_gpus=1,\n", " image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\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 6771e9d7a..569b4d346 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 @@ -71,12 +71,13 @@ "cluster = Cluster(ClusterConfiguration(\n", " name='raytest',\n", " namespace='default', # Update to your namespace\n", + " head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n", + " num_gpus=0,\n", " num_workers=2,\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\",\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 787bd315d..608fbd2e2 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 @@ -45,13 +45,13 @@ "cluster = Cluster(ClusterConfiguration(\n", " name='jobtest',\n", " namespace='default', # Update to your namespace\n", + " head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n", + " num_gpus=1,\n", " num_workers=2,\n", " min_cpus=1,\n", " max_cpus=1,\n", " min_memory=4,\n", " max_memory=4,\n", - " num_gpus=1,\n", - " head_gpus=1,\n", " image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\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 62d34f3f8..ff88d6217 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 @@ -70,12 +70,13 @@ "cluster = Cluster(ClusterConfiguration(\n", " name=cluster_name,\n", " namespace=namespace,\n", + " head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n", + " num_gpus=1,\n", " num_workers=2,\n", " min_cpus=2,\n", " max_cpus=2,\n", " min_memory=8,\n", " max_memory=8,\n", - " num_gpus=1,\n", " image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\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 6a3b37108..77b0e2788 100644 --- a/demo-notebooks/guided-demos/preview_nbs/0_basic_ray.ipynb +++ b/demo-notebooks/guided-demos/preview_nbs/0_basic_ray.ipynb @@ -63,12 +63,13 @@ "cluster = Cluster(ClusterConfiguration(\n", " name='raytest',\n", " namespace='default', # Update to your namespace\n", + " head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n", + " num_gpus=0,\n", " num_workers=2,\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\",\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 db11cada0..a041ab5b4 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 @@ -45,13 +45,13 @@ "cluster = Cluster(ClusterConfiguration(\n", " name='jobtest',\n", " namespace='default', # Update to your namespace\n", + " head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n", + " num_gpus=1,\n", " num_workers=2,\n", " min_cpus=1,\n", " max_cpus=1,\n", " min_memory=4,\n", " max_memory=4,\n", - " num_gpus=1,\n", - " head_gpus=1,\n", " image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\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 28e05a26a..44846f612 100644 --- a/demo-notebooks/guided-demos/preview_nbs/2_basic_interactive.ipynb +++ b/demo-notebooks/guided-demos/preview_nbs/2_basic_interactive.ipynb @@ -62,12 +62,13 @@ "cluster = Cluster(ClusterConfiguration(\n", " name=cluster_name,\n", " namespace=namespace,\n", + " head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n", + " num_gpus=1,\n", " num_workers=2,\n", " min_cpus=2,\n", " max_cpus=2,\n", " min_memory=8,\n", " max_memory=8,\n", - " num_gpus=1,\n", " image=\"quay.io/project-codeflare/ray:latest-py39-cu118\",\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 b83600fe7..c131b20cd 100644 --- a/docs/cluster-configuration.md +++ b/docs/cluster-configuration.md @@ -12,12 +12,12 @@ cluster = Cluster(ClusterConfiguration( head_cpus=1, # Default 2 head_memory=1, # Default 8 head_gpus=0, # Default 0 + num_gpus=0, # Default 0 num_workers=1, # Default 1 min_cpus=1, # Default 1 max_cpus=1, # Default 1 min_memory=2, # Default 2 max_memory=2, # Default 2 - num_gpus=0, # Default 0 mcad=True, # Default True image="quay.io/project-codeflare/ray:latest-py39-cu118", # Mandatory Field machine_types=["m5.xlarge", "g4dn.xlarge"],