|
149 | 149 | "metadata": {}, |
150 | 150 | "source": [ |
151 | 151 | "## Create Endpoint Configuration\n", |
152 | | - "#At launch, we will support configuring REST endpoints in hosting with multiple models, e.g. for A/B testing purposes. In order to support this, customers create an endpoint configuration, that describes the distribution of traffic across the models, whether split, shadowed, or sampled in some way.In addition, the endpoint configuration describes the instance type required for model deployment, and at launch will describe the autoscaling configuration.\n" |
| 152 | + "\n", |
| 153 | + "At launch, we will support configuring REST endpoints in hosting with multiple models, e.g. for A/B testing purposes. In order to support this, customers create an endpoint configuration, that describes the distribution of traffic across the models, whether split, shadowed, or sampled in some way.In addition, the endpoint configuration describes the instance type required for model deployment, and at launch will describe the autoscaling configuration.\n" |
153 | 154 | ] |
154 | 155 | }, |
155 | 156 | { |
|
317 | 318 | "session = Session(sagemaker_runtime_client)\n", |
318 | 319 | "\n", |
319 | 320 | "response = sagemaker_runtime_client.invoke_endpoint(\n", |
320 | | - " EndpointName=endpoint_name,\n", |
| 321 | + " EndpointName=endpoint_naeme,\n", |
321 | 322 | " ContentType=\"image/jpeg\",\n", |
322 | 323 | " Body=body)\n", |
323 | 324 | "\n", |
|
336 | 337 | "cell_type": "markdown", |
337 | 338 | "metadata": {}, |
338 | 339 | "source": [ |
339 | | - "# Perform Inference wiht url " |
| 340 | + "# Perform Inference with url " |
340 | 341 | ] |
341 | 342 | }, |
342 | 343 | { |
343 | 344 | "cell_type": "code", |
344 | | - "execution_count": 51, |
| 345 | + "execution_count": 92, |
345 | 346 | "metadata": {}, |
346 | 347 | "outputs": [], |
347 | 348 | "source": [ |
|
379 | 380 | "from sagemaker import get_execution_role\n", |
380 | 381 | "\n", |
381 | 382 | "sess = sage.Session()\n", |
382 | | - "\n", |
383 | 383 | "WORK_DIRECTORY = \"./test/new_hkid_front.jpg\"\n", |
384 | 384 | "\n", |
385 | 385 | "# S3 prefix\n", |
386 | 386 | "prefix = \"DEMO-paddle-byo\"\n", |
| 387 | + "bucket = sess.default_bucket() \n", |
| 388 | + "\n", |
| 389 | + "image_uri = f'{prefix}/new_hkid_front.jpg'\n", |
387 | 390 | "\n", |
388 | 391 | "role = get_execution_role()\n", |
389 | 392 | "\n", |
|
405 | 408 | } |
406 | 409 | ], |
407 | 410 | "source": [ |
408 | | - "bucket = 'sagemaker-eu-west-1-707684582322'\n", |
409 | | - "image_uri = 'DEMO-paddle-byo/new_hkid_front.jpg'\n", |
| 411 | + "\n", |
410 | 412 | "test_data = {\n", |
411 | 413 | " 'bucket' : bucket,\n", |
412 | 414 | " 'image_uri' : image_uri,\n", |
|
0 commit comments