Skip to content

Commit 492a788

Browse files
authored
Update Kmeans lowlevel notebook with API / endpoint changes (aws#16)
1 parent 9f735a2 commit 492a788

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

sagemaker-python-sdk/1P_kmeans_lowlevel/kmeans_mnist_lowlevel.ipynb

+8-12
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
" },\n",
228228
" \"ResourceConfig\": {\n",
229229
" \"InstanceCount\": 2,\n",
230-
" \"InstanceType\": \"c4.8xlarge\",\n",
230+
" \"InstanceType\": \"ml.c4.8xlarge\",\n",
231231
" \"VolumeSizeInGB\": 50\n",
232232
" },\n",
233233
" \"TrainingJobName\": job_name,\n",
@@ -342,9 +342,8 @@
342342
"create_endpoint_config_response = sagemaker.create_endpoint_config(\n",
343343
" EndpointConfigName = endpoint_config_name,\n",
344344
" ProductionVariants=[{\n",
345-
" 'InstanceType':'c4.xlarge',\n",
346-
" 'MaxInstanceCount':3,\n",
347-
" 'MinInstanceCount':1,\n",
345+
" 'InstanceType':'ml.c4.xlarge',\n",
346+
" 'InitialInstanceCount':3,\n",
348347
" 'ModelName':model_name,\n",
349348
" 'VariantName':'AllTraffic'}])\n",
350349
"\n",
@@ -418,8 +417,7 @@
418417
"outputs": [],
419418
"source": [
420419
"region = !aws configure get region\n",
421-
"invocation_endpoint = \"https://maeveruntime.prod.{}.ml-platform.aws.a2z.com\".format(region[0])\n",
422-
"runtime = boto3.Session().client(service_name='runtime.maeve', endpoint_url=invocation_endpoint)"
420+
"runtime = boto3.Session().client('sagemaker-runtime')"
423421
]
424422
},
425423
{
@@ -510,18 +508,16 @@
510508
{
511509
"cell_type": "code",
512510
"execution_count": null,
513-
"metadata": {
514-
"collapsed": true
515-
},
511+
"metadata": {},
516512
"outputs": [],
517513
"source": []
518514
}
519515
],
520516
"metadata": {
521517
"kernelspec": {
522-
"display_name": "Python 3",
518+
"display_name": "Environment (conda_python3)",
523519
"language": "python",
524-
"name": "python3"
520+
"name": "conda_python3"
525521
},
526522
"language_info": {
527523
"codemirror_mode": {
@@ -533,7 +529,7 @@
533529
"name": "python",
534530
"nbconvert_exporter": "python",
535531
"pygments_lexer": "ipython3",
536-
"version": "3.5.2"
532+
"version": "3.6.3"
537533
}
538534
},
539535
"nbformat": 4,

0 commit comments

Comments
 (0)