Skip to content

Commit

Permalink
update notebooks with python sdk get_image_url method (aws#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yijie Zhuang committed Jul 9, 2018
1 parent cdf63b0 commit a4e39b0
Show file tree
Hide file tree
Showing 10 changed files with 502 additions and 237 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,8 @@
"outputs": [],
"source": [
"# See 'Algorithms Provided by Amazon SageMaker: Common Parameters' in the SageMaker documentation for an explanation of these values.\n",
"containers = {'us-west-2': '174872318107.dkr.ecr.us-west-2.amazonaws.com/linear-learner:latest',\n",
" 'us-east-1': '382416733822.dkr.ecr.us-east-1.amazonaws.com/linear-learner:latest',\n",
" 'us-east-2': '404615174143.dkr.ecr.us-east-2.amazonaws.com/linear-learner:latest',\n",
" 'eu-west-1': '438346466558.dkr.ecr.eu-west-1.amazonaws.com/linear-learner:latest',\n",
" 'ap-northeast-1': '351501993468.dkr.ecr.ap-northeast-1.amazonaws.com/linear-learner:latest',\n",
" 'ap-northeast-2': '835164637446.dkr.ecr.ap-northeast-2.amazonaws.com/linear-learner:latest'}"
"from sagemaker.amazon.amazon_estimator import get_image_uri\n",
"container = get_image_uri(boto3.Session().region_name, 'linear-learner')"
]
},
{
Expand All @@ -327,7 +323,7 @@
" \"RoleArn\": role,\n",
" \"TrainingJobName\": linear_job,\n",
" \"AlgorithmSpecification\": {\n",
" \"TrainingImage\": containers[boto3.Session().region_name],\n",
" \"TrainingImage\": container,\n",
" \"TrainingInputMode\": \"File\"\n",
" },\n",
" \"ResourceConfig\": {\n",
Expand Down Expand Up @@ -439,7 +435,7 @@
"outputs": [],
"source": [
"linear_hosting_container = {\n",
" 'Image': containers[boto3.Session().region_name],\n",
" 'Image': container,\n",
" 'ModelDataUrl': sm.describe_training_job(TrainingJobName=linear_job)['ModelArtifacts']['S3ModelArtifacts']\n",
"}\n",
"\n",
Expand Down
Loading

0 comments on commit a4e39b0

Please sign in to comment.