Skip to content

Commit bd0decb

Browse files
author
Yehudit Kerido
committed
sdk tests with papermill
Signed-off-by: Yehudit Kerido <[email protected]>
1 parent c3c4faa commit bd0decb

File tree

4 files changed

+71
-291
lines changed

4 files changed

+71
-291
lines changed

examples/v1beta1/sdk/.ipynb_checkpoints/tune-train-from-func-checkpoint.ipynb

+8-7
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
"execution_count": 1,
9797
"id": "98a77484-cee4-4d77-bd76-915c469a242b",
9898
"metadata": {
99+
"editable": true,
99100
"execution": {
100101
"iopub.execute_input": "2022-09-12T18:46:59.051290Z",
101102
"iopub.status.busy": "2022-09-12T18:46:59.050544Z",
@@ -106,6 +107,9 @@
106107
"pycharm": {
107108
"name": "#%%\n"
108109
},
110+
"slideshow": {
111+
"slide_type": ""
112+
},
109113
"tags": []
110114
},
111115
"outputs": [],
@@ -549,17 +553,14 @@
549553
"\n",
550554
"# Start TFJob Training.\n",
551555
"tfjob_name = \"train-mnist\"\n",
552-
"tfjob_client = TrainingClient(namespace=namespace)\n",
556+
"tfjob_client = TrainingClient(namespace=namespace, namespace=namespace, job_kind=\"TFJob\")\n",
553557
"\n",
554558
"#create_tfjob_from_func\n",
555559
"tfjob_client.create_job(\n",
556560
" name=tfjob_name,\n",
557-
" namespace=namespace,\n",
558-
" job_kind=\"TFJob\",\n",
559561
" train_func=train_mnist_model,\n",
560562
" parameters=parameters, # Input parameters for the train function.\n",
561563
" num_workers=5, # How many TFJob Workers will be run.\n",
562-
" base_image=\"tensorflow/tensorflow:2.10.0\", # Use TensorFlow image\n",
563564
")"
564565
]
565566
},
@@ -608,7 +609,7 @@
608609
}
609610
],
610611
"source": [
611-
"print(f\"TFJob status: {tfjob_client.get_job_conditions(tfjob_name, namespace=namespace, job_kind='TFJob')}\")"
612+
"print(f\"TFJob status: {tfjob_client.get_job_conditions(tfjob_name)}\")"
612613
]
613614
},
614615
{
@@ -764,7 +765,7 @@
764765
}
765766
],
766767
"source": [
767-
"tfjob_client.get_job_logs(name=tfjob_name, namespace=namespace, is_master=True, follow=True, job_kind=\"TFJob\")"
768+
"tfjob_client.get_job_logs(name=tfjob_name, is_master=True, follow=True)"
768769
]
769770
},
770771
{
@@ -849,7 +850,7 @@
849850
}
850851
],
851852
"source": [
852-
"tfjob_client.delete_job(tfjob_name, namespace=namespace, job_kind=\"TFJob\")"
853+
"tfjob_client.delete_job(tfjob_name)"
853854
]
854855
},
855856
{

0 commit comments

Comments
 (0)