Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rm default namespace from demo notebooks #597

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,039 changes: 519 additions & 520 deletions demo-notebooks/additional-demos/hf_interactive.ipynb

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions demo-notebooks/additional-demos/local_interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@
"source": [
"# Create and submit our cluster\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",
"namespace = \"default\" # Update to your namespace\n",
"cluster_name = \"hfgputest-1\"\n",
"\n",
"cluster = Cluster(ClusterConfiguration(namespace=namespace,\n",
Bobbins228 marked this conversation as resolved.
Show resolved Hide resolved
"cluster = Cluster(ClusterConfiguration(\n",
" name=cluster_name,\n",
" head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n",
" num_gpus=0,\n",
Expand Down Expand Up @@ -118,8 +117,8 @@
"source": [
"from codeflare_sdk import generate_cert\n",
"\n",
"generate_cert.generate_tls_cert(cluster_name, namespace)\n",
"generate_cert.export_env(cluster_name, namespace)"
"generate_cert.generate_tls_cert(cluster_name, cluster.config.namespace)\n",
"generate_cert.export_env(cluster_name, cluster.config.namespace)"
]
},
{
Expand Down
1 change: 0 additions & 1 deletion demo-notebooks/additional-demos/ray_job_client.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"# 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='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",
Expand Down
1 change: 0 additions & 1 deletion demo-notebooks/guided-demos/0_basic_ray.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
"# 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",
" 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",
Expand Down
1 change: 0 additions & 1 deletion demo-notebooks/guided-demos/1_cluster_job_client.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"# 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='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",
Expand Down
6 changes: 2 additions & 4 deletions demo-notebooks/guided-demos/2_basic_interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,9 @@
"source": [
"# 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",
"namespace = \"default\" # Update to your namespace\n",
"cluster_name = \"interactivetest\"\n",
"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",
Expand Down Expand Up @@ -137,8 +135,8 @@
"source": [
"from codeflare_sdk import generate_cert\n",
"# Create required TLS cert and export the environment variables to enable TLS\n",
"generate_cert.generate_tls_cert(cluster_name, namespace)\n",
"generate_cert.export_env(cluster_name, namespace)"
"generate_cert.generate_tls_cert(cluster_name, cluster.config.namespace)\n",
"generate_cert.export_env(cluster_name, cluster.config.namespace)"
]
},
{
Expand Down
45 changes: 22 additions & 23 deletions demo-notebooks/guided-demos/notebook-ex-outputs/0_basic_ray.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
"# 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",
" 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",
Expand Down Expand Up @@ -134,13 +133,13 @@
],
"text/plain": [
"╭───────────────────────╮\n",
"│ \u001B[3m \u001B[0m\u001B[1;3m 🚀 Cluster Queue\u001B[0m\u001B[3m \u001B[0m │\n",
"│ \u001B[3m \u001B[0m\u001B[1;3mStatus 🚀\u001B[0m\u001B[3m \u001B[0m │\n",
"│ \u001b[3m \u001b[0m\u001b[1;3m 🚀 Cluster Queue\u001b[0m\u001b[3m \u001b[0m │\n",
"│ \u001b[3m \u001b[0m\u001b[1;3mStatus 🚀\u001b[0m\u001b[3m \u001b[0m │\n",
"│ +---------+---------+ │\n",
"│ |\u001B[1m \u001B[0m\u001B[1mName \u001B[0m\u001B[1m \u001B[0m|\u001B[1m \u001B[0m\u001B[1mStatus \u001B[0m\u001B[1m \u001B[0m| │\n",
"│ |\u001b[1m \u001b[0m\u001b[1mName \u001b[0m\u001b[1m \u001b[0m|\u001b[1m \u001b[0m\u001b[1mStatus \u001b[0m\u001b[1m \u001b[0m| │\n",
"│ +=========+=========+ │\n",
"│ |\u001B[36m \u001B[0m\u001B[36mraytest\u001B[0m\u001B[36m \u001B[0m|\u001B[35m \u001B[0m\u001B[35mpending\u001B[0m\u001B[35m \u001B[0m| │\n",
"│ |\u001B[36m \u001B[0m\u001B[36m \u001B[0m\u001B[36m \u001B[0m|\u001B[35m \u001B[0m\u001B[35m \u001B[0m\u001B[35m \u001B[0m| │\n",
"│ |\u001b[36m \u001b[0m\u001b[36mraytest\u001b[0m\u001b[36m \u001b[0m|\u001b[35m \u001b[0m\u001b[35mpending\u001b[0m\u001b[35m \u001b[0m| │\n",
"│ |\u001b[36m \u001b[0m\u001b[36m \u001b[0m\u001b[36m \u001b[0m|\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m| │\n",
"│ +---------+---------+ │\n",
"╰───────────────────────╯\n"
]
Expand Down Expand Up @@ -205,15 +204,15 @@
"</pre>\n"
],
"text/plain": [
"\u001B[3m \u001B[0m\u001B[1;3m 🚀 CodeFlare Cluster Status 🚀\u001B[0m\u001B[3m \u001B[0m\n",
"\u001B[1m \u001B[0m\u001B[1m \u001B[0m\u001B[1m \u001B[0m\n",
"\u001b[3m \u001b[0m\u001b[1;3m 🚀 CodeFlare Cluster Status 🚀\u001b[0m\u001b[3m \u001b[0m\n",
"\u001b[1m \u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0m\n",
" ╭──────────────────────────────────────────────────────────────╮ \n",
" │ \u001B[1;37;42mName\u001B[0m │ \n",
" │ \u001B[1;4mraytest\u001B[0m Active ✅ │ \n",
" │ \u001b[1;37;42mName\u001b[0m │ \n",
" │ \u001b[1;4mraytest\u001b[0m Active ✅ │ \n",
" │ │ \n",
" │ \u001B[1mURI:\u001B[0m ray://raytest-head-svc.default.svc:10001 │ \n",
" │ \u001b[1mURI:\u001b[0m ray://raytest-head-svc.default.svc:10001 │ \n",
" │ │ \n",
" │ \u001B]8;id=630217;ray-dashboard-raytest-default.apps.meyceoz-07122023.psap.aws.rhperfscale.org\u001B\\\u001B[4;34mDashboard🔗\u001B[0m\u001B]8;;\u001B\\ │ \n",
" │ \u001b]8;id=630217;ray-dashboard-raytest-default.apps.meyceoz-07122023.psap.aws.rhperfscale.org\u001b\\\u001b[4;34mDashboard🔗\u001b[0m\u001b]8;;\u001b\\ │ \n",
" │ │ \n",
" ╰──────────────────────────────────────────────────────────────╯ \n"
]
Expand Down Expand Up @@ -274,22 +273,22 @@
"</pre>\n"
],
"text/plain": [
"\u001B[3m \u001B[0m\u001B[1;3m 🚀 CodeFlare Cluster Details 🚀\u001B[0m\u001B[3m \u001B[0m\n",
"\u001B[1m \u001B[0m\u001B[1m \u001B[0m\u001B[1m \u001B[0m\n",
"\u001b[3m \u001b[0m\u001b[1;3m 🚀 CodeFlare Cluster Details 🚀\u001b[0m\u001b[3m \u001b[0m\n",
"\u001b[1m \u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0m\n",
" ╭───────────────────────────────────────────────────────────────╮ \n",
" │ \u001B[1;37;42mName\u001B[0m │ \n",
" │ \u001B[1;4mraytest\u001B[0m Active ✅ │ \n",
" │ \u001b[1;37;42mName\u001b[0m │ \n",
" │ \u001b[1;4mraytest\u001b[0m Active ✅ │ \n",
" │ │ \n",
" │ \u001B[1mURI:\u001B[0m ray://raytest-head-svc.default.svc:10001 │ \n",
" │ \u001b[1mURI:\u001b[0m ray://raytest-head-svc.default.svc:10001 │ \n",
" │ │ \n",
" │ \u001B]8;id=623965;http://ray-dashboard-raytest-default.apps.meyceoz-07122023.psap.aws.rhperfscale.org\u001B\\\u001B[4;34mDashboard🔗\u001B[0m\u001B]8;;\u001B\\ │ \n",
" │ \u001b]8;id=623965;http://ray-dashboard-raytest-default.apps.meyceoz-07122023.psap.aws.rhperfscale.org\u001b\\\u001b[4;34mDashboard🔗\u001b[0m\u001b]8;;\u001b\\ │ \n",
" │ │ \n",
" │ \u001B[3m Cluster Resources \u001B[0m │ \n",
" │ \u001b[3m Cluster Resources \u001b[0m │ \n",
" │ ╭── Workers ──╮ ╭───────── Worker specs(each) ─────────╮ │ \n",
" │ │ \u001B[1m \u001B[0m\u001B[1m# Workers\u001B[0m\u001B[1m \u001B[0m │ │ \u001B[1m \u001B[0m\u001B[1mMemory \u001B[0m\u001B[1m \u001B[0m\u001B[1m \u001B[0m\u001B[1mCPU \u001B[0m\u001B[1m \u001B[0m\u001B[1m \u001B[0m\u001B[1mGPU \u001B[0m\u001B[1m \u001B[0m │ │ \n",
" │ │ \u001B[35m \u001B[0m\u001B[35m \u001B[0m\u001B[35m \u001B[0m │ │ \u001B[36m \u001B[0m\u001B[36m \u001B[0m\u001B[36m \u001B[0m\u001B[35m \u001B[0m\u001B[35m \u001B[0m\u001B[35m \u001B[0m\u001B[35m \u001B[0m\u001B[35m \u001B[0m\u001B[35m \u001B[0m │ │ \n",
" │ │ \u001B[35m \u001B[0m\u001B[35m2 \u001B[0m\u001B[35m \u001B[0m │ │ \u001B[36m \u001B[0m\u001B[36m4~4 \u001B[0m\u001B[36m \u001B[0m\u001B[35m \u001B[0m\u001B[35m1 \u001B[0m\u001B[35m \u001B[0m\u001B[35m \u001B[0m\u001B[35m0 \u001B[0m\u001B[35m \u001B[0m │ │ \n",
" │ │ \u001B[35m \u001B[0m\u001B[35m \u001B[0m\u001B[35m \u001B[0m │ │ \u001B[36m \u001B[0m\u001B[36m \u001B[0m\u001B[36m \u001B[0m\u001B[35m \u001B[0m\u001B[35m \u001B[0m\u001B[35m \u001B[0m\u001B[35m \u001B[0m\u001B[35m \u001B[0m\u001B[35m \u001B[0m │ │ \n",
" │ │ \u001b[1m \u001b[0m\u001b[1m# Workers\u001b[0m\u001b[1m \u001b[0m │ │ \u001b[1m \u001b[0m\u001b[1mMemory \u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0m\u001b[1mCPU \u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0m\u001b[1mGPU \u001b[0m\u001b[1m \u001b[0m │ │ \n",
" │ │ \u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m │ │ \u001b[36m \u001b[0m\u001b[36m \u001b[0m\u001b[36m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m │ │ \n",
" │ │ \u001b[35m \u001b[0m\u001b[35m2 \u001b[0m\u001b[35m \u001b[0m │ │ \u001b[36m \u001b[0m\u001b[36m4~4 \u001b[0m\u001b[36m \u001b[0m\u001b[35m \u001b[0m\u001b[35m1 \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m0 \u001b[0m\u001b[35m \u001b[0m │ │ \n",
" │ │ \u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m │ │ \u001b[36m \u001b[0m\u001b[36m \u001b[0m\u001b[36m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m\u001b[35m \u001b[0m │ │ \n",
" │ ╰─────────────╯ ╰──────────────────────────────────────╯ │ \n",
" ╰───────────────────────────────────────────────────────────────╯ \n"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"# 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='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",
Expand Down
Loading