Skip to content

Commit 0f1532f

Browse files
andreyvelichtdn21
authored andcommitted
fix(examples): Update get_job_logs() API in examples (kubeflow#2813)
* fix(examples): Update get_job_logs() API in examples Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com> * Fix deepspeed Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com> --------- Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com> Signed-off-by: Tarun Duhan <itarunduhan@gmail.com>
1 parent 5e92196 commit 0f1532f

5 files changed

Lines changed: 790 additions & 586 deletions

File tree

examples/deepspeed/text-summarization/T5-Fine-Tuning.ipynb

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,17 @@
5454
},
5555
{
5656
"cell_type": "code",
57-
"execution_count": 1,
57+
"execution_count": 18,
5858
"id": "d038d8cd-4e5a-4c4c-aa17-a5c575e2948a",
59-
"metadata": {},
59+
"metadata": {
60+
"execution": {
61+
"iopub.execute_input": "2025-09-03T13:52:24.274907Z",
62+
"iopub.status.busy": "2025-09-03T13:52:24.274513Z",
63+
"iopub.status.idle": "2025-09-03T13:52:25.719652Z",
64+
"shell.execute_reply": "2025-09-03T13:52:25.717711Z",
65+
"shell.execute_reply.started": "2025-09-03T13:52:24.274872Z"
66+
}
67+
},
6068
"outputs": [
6169
{
6270
"name": "stdout",
@@ -78,6 +86,11 @@
7886
" \"op\": \"add\",\n",
7987
" \"path\": \"/spec/template/spec/replicatedJobs/1/template/spec/template/spec/containers/0/resources\",\n",
8088
" \"value\": { \"limits\": { \"nvidia.com/gpu\": \"2\" } }\n",
89+
" },\n",
90+
" {\n",
91+
" \"op\": \"replace\",\n",
92+
" \"path\": \"/spec/mlPolicy/mpi/numProcPerNode\",\n",
93+
" \"value\": 2\n",
8194
" }\n",
8295
"]\n",
8396
"\"\"\"\n",
@@ -455,7 +468,7 @@
455468
},
456469
{
457470
"cell_type": "code",
458-
"execution_count": 8,
471+
"execution_count": null,
459472
"id": "6e630fd3-f061-4fea-8024-7bffcefb257c",
460473
"metadata": {},
461474
"outputs": [
@@ -762,7 +775,8 @@
762775
}
763776
],
764777
"source": [
765-
"_ = TrainerClient().get_job_logs(name=job_id, follow=True)"
778+
"for logline in TrainerClient().get_job_logs(job_id, follow=True):\n",
779+
" print(logline)"
766780
]
767781
},
768782
{

0 commit comments

Comments
 (0)