Skip to content
This repository was archived by the owner on Oct 4, 2024. It is now read-only.

Commit 8af6abd

Browse files
committed
TF2 workflow SM SDK v2 mods
1 parent 3ab88f4 commit 8af6abd

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

tf-2-workflow/tf-2-workflow.ipynb

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
" 6. [Cleanup](#Cleanup)\n",
2424
"9. [Extensions](#Extensions)\n",
2525
"\n",
26+
"\n",
27+
"### ***Prerequisite: To run the Local Mode sections of this example, use a SageMaker Notebook Instance; otherwise skip those sections (for example if you're using SageMaker Studio instead).***\n",
28+
"\n",
2629
" \n",
2730
"## Introduction <a class=\"anchor\" id=\"Introduction\">\n",
2831
"\n",
@@ -257,8 +260,8 @@
257260
" source_dir='tf-2-workflow/train_model',\n",
258261
" entry_point='train.py',\n",
259262
" model_dir=model_dir,\n",
260-
" train_instance_type=train_instance_type,\n",
261-
" train_instance_count=1,\n",
263+
" instance_type=train_instance_type,\n",
264+
" instance_count=1,\n",
262265
" hyperparameters=hyperparameters,\n",
263266
" role=sagemaker.get_execution_role(),\n",
264267
" base_job_name='tf-2-workflow',\n",
@@ -429,12 +432,15 @@
429432
"train_instance_type = 'ml.c5.xlarge'\n",
430433
"hyperparameters = {'epochs': 30, 'batch_size': 128, 'learning_rate': 0.01}\n",
431434
"\n",
435+
"git_config = {'repo': 'https://github.com/aws-samples/amazon-sagemaker-script-mode', \n",
436+
" 'branch': 'master'}\n",
437+
"\n",
432438
"estimator = TensorFlow(git_config=git_config,\n",
433439
" source_dir='tf-2-workflow/train_model',\n",
434440
" entry_point='train.py',\n",
435441
" model_dir=model_dir,\n",
436-
" train_instance_type=train_instance_type,\n",
437-
" train_instance_count=1,\n",
442+
" instance_type=train_instance_type,\n",
443+
" instance_count=1,\n",
438444
" hyperparameters=hyperparameters,\n",
439445
" role=sagemaker.get_execution_role(),\n",
440446
" base_job_name='tf-2-workflow',\n",
@@ -644,7 +650,7 @@
644650
"metadata": {},
645651
"outputs": [],
646652
"source": [
647-
"sess.delete_endpoint(tuning_predictor.endpoint)"
653+
"sess.delete_endpoint(tuning_predictor.endpoint_name)"
648654
]
649655
},
650656
{

0 commit comments

Comments
 (0)