|
23 | 23 | " 6. [Cleanup](#Cleanup)\n",
|
24 | 24 | "9. [Extensions](#Extensions)\n",
|
25 | 25 | "\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", |
26 | 29 | " \n",
|
27 | 30 | "## Introduction <a class=\"anchor\" id=\"Introduction\">\n",
|
28 | 31 | "\n",
|
|
257 | 260 | " source_dir='tf-2-workflow/train_model',\n",
|
258 | 261 | " entry_point='train.py',\n",
|
259 | 262 | " 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", |
262 | 265 | " hyperparameters=hyperparameters,\n",
|
263 | 266 | " role=sagemaker.get_execution_role(),\n",
|
264 | 267 | " base_job_name='tf-2-workflow',\n",
|
|
429 | 432 | "train_instance_type = 'ml.c5.xlarge'\n",
|
430 | 433 | "hyperparameters = {'epochs': 30, 'batch_size': 128, 'learning_rate': 0.01}\n",
|
431 | 434 | "\n",
|
| 435 | + "git_config = {'repo': 'https://github.com/aws-samples/amazon-sagemaker-script-mode', \n", |
| 436 | + " 'branch': 'master'}\n", |
| 437 | + "\n", |
432 | 438 | "estimator = TensorFlow(git_config=git_config,\n",
|
433 | 439 | " source_dir='tf-2-workflow/train_model',\n",
|
434 | 440 | " entry_point='train.py',\n",
|
435 | 441 | " 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", |
438 | 444 | " hyperparameters=hyperparameters,\n",
|
439 | 445 | " role=sagemaker.get_execution_role(),\n",
|
440 | 446 | " base_job_name='tf-2-workflow',\n",
|
|
644 | 650 | "metadata": {},
|
645 | 651 | "outputs": [],
|
646 | 652 | "source": [
|
647 |
| - "sess.delete_endpoint(tuning_predictor.endpoint)" |
| 653 | + "sess.delete_endpoint(tuning_predictor.endpoint_name)" |
648 | 654 | ]
|
649 | 655 | },
|
650 | 656 | {
|
|
0 commit comments