Skip to content

Commit 661f815

Browse files
committed
rm default namespace from demo notebooks
Signed-off-by: Kevin <[email protected]>
1 parent 304a1e7 commit 661f815

12 files changed

+1337
-1352
lines changed

demo-notebooks/additional-demos/hf_interactive.ipynb

+519-520
Large diffs are not rendered by default.

demo-notebooks/additional-demos/local_interactive.ipynb

+3-4
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,9 @@
5050
"source": [
5151
"# Create and submit our cluster\n",
5252
"# 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",
53-
"namespace = \"default\" # Update to your namespace\n",
5453
"cluster_name = \"hfgputest-1\"\n",
5554
"\n",
56-
"cluster = Cluster(ClusterConfiguration(namespace=namespace,\n",
55+
"cluster = Cluster(ClusterConfiguration(\n",
5756
" name=cluster_name,\n",
5857
" head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n",
5958
" num_gpus=0,\n",
@@ -118,8 +117,8 @@
118117
"source": [
119118
"from codeflare_sdk import generate_cert\n",
120119
"\n",
121-
"generate_cert.generate_tls_cert(cluster_name, namespace)\n",
122-
"generate_cert.export_env(cluster_name, namespace)"
120+
"generate_cert.generate_tls_cert(cluster_name, cluster.config.namespace)\n",
121+
"generate_cert.export_env(cluster_name, cluster.config.namespace)"
123122
]
124123
},
125124
{

demo-notebooks/additional-demos/ray_job_client.ipynb

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
"# 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",
4646
"cluster = Cluster(ClusterConfiguration(\n",
4747
" name='jobtest',\n",
48-
" namespace='default', # Update to your namespace\n",
4948
" head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n",
5049
" num_gpus=0,\n",
5150
" num_workers=2,\n",

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

-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
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-
" namespace='default', # Update to your namespace\n",
6665
" head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n",
6766
" num_gpus=0,\n",
6867
" num_workers=2,\n",

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

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"# 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",
4545
"cluster = Cluster(ClusterConfiguration(\n",
4646
" name='jobtest',\n",
47-
" namespace='default', # Update to your namespace\n",
4847
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
4948
" num_gpus=1,\n",
5049
" num_workers=2,\n",

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,9 @@
5757
"source": [
5858
"# Create and configure our cluster object\n",
5959
"# 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",
60-
"namespace = \"default\" # Update to your namespace\n",
6160
"cluster_name = \"interactivetest\"\n",
6261
"cluster = Cluster(ClusterConfiguration(\n",
6362
" name=cluster_name,\n",
64-
" namespace=namespace,\n",
6563
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
6664
" num_gpus=1,\n",
6765
" num_workers=2,\n",
@@ -137,8 +135,8 @@
137135
"source": [
138136
"from codeflare_sdk import generate_cert\n",
139137
"# Create required TLS cert and export the environment variables to enable TLS\n",
140-
"generate_cert.generate_tls_cert(cluster_name, namespace)\n",
141-
"generate_cert.export_env(cluster_name, namespace)"
138+
"generate_cert.generate_tls_cert(cluster_name, cluster.config.namespace)\n",
139+
"generate_cert.export_env(cluster_name, cluster.config.namespace)"
142140
]
143141
},
144142
{

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

+22-23
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
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-
" namespace='default', # Update to your namespace\n",
7473
" head_gpus=0, # For GPU enabled workloads set the head_gpus and num_gpus\n",
7574
" num_gpus=0,\n",
7675
" num_workers=2,\n",
@@ -134,13 +133,13 @@
134133
],
135134
"text/plain": [
136135
"╭───────────────────────╮\n",
137-
"\u001B[3m \u001B[0m\u001B[1;3m 🚀 Cluster Queue\u001B[0m\u001B[3m \u001B[0m │\n",
138-
"\u001B[3m \u001B[0m\u001B[1;3mStatus 🚀\u001B[0m\u001B[3m \u001B[0m │\n",
136+
"\u001b[3m \u001b[0m\u001b[1;3m 🚀 Cluster Queue\u001b[0m\u001b[3m \u001b[0m │\n",
137+
"\u001b[3m \u001b[0m\u001b[1;3mStatus 🚀\u001b[0m\u001b[3m \u001b[0m │\n",
139138
"│ +---------+---------+ │\n",
140-
"│ |\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",
139+
"│ |\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",
141140
"│ +=========+=========+ │\n",
142-
"│ |\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",
143-
"│ |\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",
141+
"│ |\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",
142+
"│ |\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",
144143
"│ +---------+---------+ │\n",
145144
"╰───────────────────────╯\n"
146145
]
@@ -205,15 +204,15 @@
205204
"</pre>\n"
206205
],
207206
"text/plain": [
208-
"\u001B[3m \u001B[0m\u001B[1;3m 🚀 CodeFlare Cluster Status 🚀\u001B[0m\u001B[3m \u001B[0m\n",
209-
"\u001B[1m \u001B[0m\u001B[1m \u001B[0m\u001B[1m \u001B[0m\n",
207+
"\u001b[3m \u001b[0m\u001b[1;3m 🚀 CodeFlare Cluster Status 🚀\u001b[0m\u001b[3m \u001b[0m\n",
208+
"\u001b[1m \u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0m\n",
210209
" ╭──────────────────────────────────────────────────────────────╮ \n",
211-
"\u001B[1;37;42mName\u001B[0m │ \n",
212-
"\u001B[1;4mraytest\u001B[0m Active ✅ │ \n",
210+
"\u001b[1;37;42mName\u001b[0m │ \n",
211+
"\u001b[1;4mraytest\u001b[0m Active ✅ │ \n",
213212
" │ │ \n",
214-
"\u001B[1mURI:\u001B[0m ray://raytest-head-svc.default.svc:10001 │ \n",
213+
"\u001b[1mURI:\u001b[0m ray://raytest-head-svc.default.svc:10001 │ \n",
215214
" │ │ \n",
216-
"\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",
215+
"\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",
217216
" │ │ \n",
218217
" ╰──────────────────────────────────────────────────────────────╯ \n"
219218
]
@@ -274,22 +273,22 @@
274273
"</pre>\n"
275274
],
276275
"text/plain": [
277-
"\u001B[3m \u001B[0m\u001B[1;3m 🚀 CodeFlare Cluster Details 🚀\u001B[0m\u001B[3m \u001B[0m\n",
278-
"\u001B[1m \u001B[0m\u001B[1m \u001B[0m\u001B[1m \u001B[0m\n",
276+
"\u001b[3m \u001b[0m\u001b[1;3m 🚀 CodeFlare Cluster Details 🚀\u001b[0m\u001b[3m \u001b[0m\n",
277+
"\u001b[1m \u001b[0m\u001b[1m \u001b[0m\u001b[1m \u001b[0m\n",
279278
" ╭───────────────────────────────────────────────────────────────╮ \n",
280-
"\u001B[1;37;42mName\u001B[0m │ \n",
281-
"\u001B[1;4mraytest\u001B[0m Active ✅ │ \n",
279+
"\u001b[1;37;42mName\u001b[0m │ \n",
280+
"\u001b[1;4mraytest\u001b[0m Active ✅ │ \n",
282281
" │ │ \n",
283-
"\u001B[1mURI:\u001B[0m ray://raytest-head-svc.default.svc:10001 │ \n",
282+
"\u001b[1mURI:\u001b[0m ray://raytest-head-svc.default.svc:10001 │ \n",
284283
" │ │ \n",
285-
"\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",
284+
"\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",
286285
" │ │ \n",
287-
"\u001B[3m Cluster Resources \u001B[0m │ \n",
286+
"\u001b[3m Cluster Resources \u001b[0m │ \n",
288287
" │ ╭── Workers ──╮ ╭───────── Worker specs(each) ─────────╮ │ \n",
289-
" │ │ \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",
290-
" │ │ \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",
291-
" │ │ \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",
292-
" │ │ \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",
288+
" │ │ \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",
289+
" │ │ \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",
290+
" │ │ \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",
291+
" │ │ \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",
293292
" │ ╰─────────────╯ ╰──────────────────────────────────────╯ │ \n",
294293
" ╰───────────────────────────────────────────────────────────────╯ \n"
295294
]

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

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"# 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",
4545
"cluster = Cluster(ClusterConfiguration(\n",
4646
" name='jobtest',\n",
47-
" namespace='default', # Update to your namespace\n",
4847
" head_gpus=1, # For GPU enabled workloads set the head_gpus and num_gpus\n",
4948
" num_gpus=1,\n",
5049
" num_workers=2,\n",

0 commit comments

Comments
 (0)