|
13 | 13 | " 2. [Data ingestion](#Data-ingestion)\n",
|
14 | 14 | " 3. [Data inspection](#Data-inspection)\n",
|
15 | 15 | " 4. [Data conversion](#Data-conversion)\n",
|
16 |
| - "3. [Training the K-Means model](#Training-the-K-Means-model)\n", |
| 16 | + "3. [Training the linear model](#Training-the-linear-model)\n", |
17 | 17 | "4. [Set up hosting for the model](#Set-up-hosting-for-the-model)\n",
|
18 |
| - " 1. [Import model into hosting](#Import-model-into-hosting)\n", |
19 |
| - " 2. [Create endpoint configuration](#Create-endpoint-configuration)\n", |
20 |
| - " 3. [Create endpoint](#Create-endpoint)\n", |
21 | 18 | "5. [Validate the model for use](#Validate-the-model-for-use)\n"
|
22 | 19 | ]
|
23 | 20 | },
|
|
56 | 53 | "cell_type": "code",
|
57 | 54 | "execution_count": null,
|
58 | 55 | "metadata": {
|
| 56 | + "collapsed": true, |
59 | 57 | "isConfigCell": true
|
60 | 58 | },
|
61 | 59 | "outputs": [],
|
|
207 | 205 | "\n",
|
208 | 206 | "Again, we'll use the Amazon SageMaker Python SDK to kick off training, and monitor status until it is completed. In this example that takes between 7 and 11 minutes. Despite the dataset being small, provisioning hardware and loading the algorithm container take time upfront.\n",
|
209 | 207 | "\n",
|
210 |
| - "First, let's specify our containers. Since we want this notebook to run in all 4 of Amazon SageMaker's regions, we'll create a small lookup. More details on algorithm containers can be found in [AWS documentation](https://docs-aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html)." |
| 208 | + "First, let's specify our containers. Since we want this notebook to run in all 4 of Amazon SageMaker's regions, we'll create a small lookup. More details on algorithm containers can be found in [AWS documentation](https://docs-aws.amazon.com/sagemaker/latest/dg/im-algo-docker-registry-paths.html)." |
211 | 209 | ]
|
212 | 210 | },
|
213 | 211 | {
|
214 | 212 | "cell_type": "code",
|
215 | 213 | "execution_count": null,
|
216 |
| - "metadata": {}, |
| 214 | + "metadata": { |
| 215 | + "collapsed": true |
| 216 | + }, |
217 | 217 | "outputs": [],
|
218 | 218 | "source": [
|
219 | 219 | "containers = {'us-west-2': '174872318107.dkr.ecr.us-west-2.amazonaws.com/linear-learner:latest',\n",
|
|
287 | 287 | {
|
288 | 288 | "cell_type": "code",
|
289 | 289 | "execution_count": null,
|
290 |
| - "metadata": {}, |
| 290 | + "metadata": { |
| 291 | + "collapsed": true |
| 292 | + }, |
291 | 293 | "outputs": [],
|
292 | 294 | "source": [
|
293 | 295 | "from sagemaker.predictor import csv_serializer, json_deserializer\n",
|
|
307 | 309 | {
|
308 | 310 | "cell_type": "code",
|
309 | 311 | "execution_count": null,
|
310 |
| - "metadata": {}, |
| 312 | + "metadata": { |
| 313 | + "collapsed": true |
| 314 | + }, |
311 | 315 | "outputs": [],
|
312 | 316 | "source": [
|
313 | 317 | "result = linear_predictor.predict(train_set[0][30:31])\n",
|
|
326 | 330 | {
|
327 | 331 | "cell_type": "code",
|
328 | 332 | "execution_count": null,
|
329 |
| - "metadata": {}, |
| 333 | + "metadata": { |
| 334 | + "collapsed": true |
| 335 | + }, |
330 | 336 | "outputs": [],
|
331 | 337 | "source": [
|
332 | 338 | "import numpy as np\n",
|
|
342 | 348 | {
|
343 | 349 | "cell_type": "code",
|
344 | 350 | "execution_count": null,
|
345 |
| - "metadata": {}, |
| 351 | + "metadata": { |
| 352 | + "collapsed": true |
| 353 | + }, |
346 | 354 | "outputs": [],
|
347 | 355 | "source": [
|
348 | 356 | "import pandas as pd\n",
|
|
369 | 377 | {
|
370 | 378 | "cell_type": "code",
|
371 | 379 | "execution_count": null,
|
372 |
| - "metadata": {}, |
| 380 | + "metadata": { |
| 381 | + "collapsed": true |
| 382 | + }, |
373 | 383 | "outputs": [],
|
374 | 384 | "source": [
|
375 | 385 | "import sagemaker\n",
|
|
380 | 390 | ],
|
381 | 391 | "metadata": {
|
382 | 392 | "kernelspec": {
|
383 |
| - "display_name": "Environment (conda_python3)", |
| 393 | + "display_name": "conda_python3", |
384 | 394 | "language": "python",
|
385 | 395 | "name": "conda_python3"
|
386 | 396 | },
|
|
394 | 404 | "name": "python",
|
395 | 405 | "nbconvert_exporter": "python",
|
396 | 406 | "pygments_lexer": "ipython3",
|
397 |
| - "version": "3.6.3" |
| 407 | + "version": "3.6.2" |
398 | 408 | },
|
399 | 409 | "notice": "Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the \"License\"). You may not use this file except in compliance with the License. A copy of the License is located at http://aws.amazon.com/apache2.0/ or in the \"license\" file accompanying this file. This file is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
|
400 | 410 | },
|
|
0 commit comments