|
4 | 4 | "cell_type": "markdown",
|
5 | 5 | "metadata": {},
|
6 | 6 | "source": [
|
7 |
| - "## Deploy and perform inference on ML Model packages from AWS Marketplace.\n", |
| 7 | + "# Deploy and perform inference on ML Model packages from AWS Marketplace\n", |
8 | 8 | "\n",
|
9 | 9 | "There are two simple ways to try/deploy [ML model packages from AWS Marketplace](https://aws.amazon.com/marketplace/search/results?page=1&filters=FulfillmentOptionType%2CSageMaker::ResourceType&FulfillmentOptionType=SageMaker&SageMaker::ResourceType=ModelPackage), either using AWS console to deploy an ML model package (see [this blog](https://aws.amazon.com/blogs/machine-learning/adding-ai-to-your-applications-with-ready-to-use-models-from-aws-marketplace/)) or via code written typically in a Jupyter notebook. Many listings have a high-quality sample Jupyter notebooks provided by the seller itself, usually, these sample notebooks are linked to the AWS Marketplace listing (E.g. [Source Separation](https://aws.amazon.com/marketplace/pp/prodview-23n4vi2zw67we?qid=1579739476471&sr=0-1&ref_=srh_res_product_title)), If a sample notebook exists, try it out. \n",
|
10 | 10 | "\n",
|
|
14 | 14 | "\n",
|
15 | 15 | "> **Note**:If you are facing technical issues while trying an ML model package from AWS Marketplace and need help, please open a support ticket or write to the team on [email protected] for additional assistance.\n",
|
16 | 16 | "\n",
|
17 |
| - "#### Pre-requisites:\n", |
| 17 | + "## Pre-requisites\n", |
18 | 18 | "1. Open this notebook from an Amazon SageMaker Notebook instance.\n",
|
19 | 19 | "1. Ensure that Amazon SageMaker notebook instance used has IAMExecutionRole with **AmazonSageMakerFullAccess**\n",
|
20 | 20 | "1. Your IAM role has these three permisions - **aws-marketplace:ViewSubscriptions**, **aws-marketplace:Unsubscribe**, **aws-marketplace:Subscribe** and you have authority to make AWS Marketplace subscriptions in the AWS account used.\n",
|
|
23 | 23 | "\n",
|
24 | 24 | "\n",
|
25 | 25 | "\n",
|
26 |
| - "#### Additional Resources:\n", |
| 26 | + "## Additional Resources\n", |
27 | 27 | "**Background on Model Packages**:\n",
|
28 | 28 | "1. An ML model can be created from a Model Package, to know how, see [Use a Model Package to Create a Model](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-mkt-model-pkg-model.html). \n",
|
29 | 29 | "2. An ML Model accepts data and generates predictions.\n",
|
|
39 | 39 | "* For a Jupyter notebook of the sample solution for **Automating auto insurance claim processing workflow** outlined in [this re:Mars session](https://www.youtube.com/watch?v=GkKZt0s_ku0), see [amazon-sagemaker-examples/aws-marketplace](https://github.com/awslabs/amazon-sagemaker-examples/tree/master/aws_marketplace/using_model_packages/auto_insurance) GitHub repository.\n",
|
40 | 40 | "* For a Jupyter notebook of the sample solution for **Improving workplace safety solution** outlined in [this re:Invent session](https://www.youtube.com/watch?v=iLOXaWpK6ag), see [amazon-sagemaker-examples/aws-marketplace](https://github.com/awslabs/amazon-sagemaker-examples/tree/master/aws_marketplace/using_model_packages/improving_industrial_workplace_safety) GitHub repository.\n",
|
41 | 41 | "\n",
|
42 |
| - "#### Contents:\n", |
| 42 | + "## Contents\n", |
43 | 43 | "1. [Subscribe to the model package](#Subscribe-to-the-model-package)\n",
|
44 | 44 | " 1. [Identify compatible instance-type](#A.-Identify-compatible-instance-type)\n",
|
45 | 45 | " 2. [Identify content-type](#B.-Identify-content_type)\n",
|
|
57 | 57 | "4. [Delete the model](#4.-Delete-the-model)\n",
|
58 | 58 | "5. [Unsubscribe to the model package](#Unsubscribe-to-the-model-package)\n",
|
59 | 59 | "\n",
|
60 |
| - "#### Usage instructions\n", |
| 60 | + "## Usage instructions\n", |
61 | 61 | "You can run this notebook one cell at a time (By using Shift+Enter for running a cell)."
|
62 | 62 | ]
|
63 | 63 | },
|
|
112 | 112 | "cell_type": "markdown",
|
113 | 113 | "metadata": {},
|
114 | 114 | "source": [
|
115 |
| - "### 1. Subscribe to the model package" |
| 115 | + "## 1. Subscribe to the model package" |
116 | 116 | ]
|
117 | 117 | },
|
118 | 118 | {
|
|
140 | 140 | "cell_type": "markdown",
|
141 | 141 | "metadata": {},
|
142 | 142 | "source": [
|
143 |
| - "#### A. Identify compatible instance-type\n", |
| 143 | + "### A. Identify compatible instance-type\n", |
144 | 144 | "\n",
|
145 | 145 | "1. On the listing, Under **Pricing Information**, you will see **software pricing** for **real-time inference** as well as **batch-transform usage** for specific instance-types. \n",
|
146 | 146 | "\n",
|
|
168 | 168 | "cell_type": "markdown",
|
169 | 169 | "metadata": {},
|
170 | 170 | "source": [
|
171 |
| - "#### B. Identify content_type\n", |
| 171 | + "### B. Identify content_type\n", |
172 | 172 | "You need to specify input content-type and payload while performing inference on the model. In this sub-section you will identify input content type that is accepted by the model you wish to try. "
|
173 | 173 | ]
|
174 | 174 | },
|
|
214 | 214 | "cell_type": "markdown",
|
215 | 215 | "metadata": {},
|
216 | 216 | "source": [
|
217 |
| - "#### C. Specify model-package-arn\n", |
| 217 | + "### C. Specify model-package-arn\n", |
218 | 218 | "A model-package-arn is a unique identifier for each ML model package from AWS Marketplace within a chosen region."
|
219 | 219 | ]
|
220 | 220 | },
|
|
249 | 249 | "cell_type": "markdown",
|
250 | 250 | "metadata": {},
|
251 | 251 | "source": [
|
252 |
| - "### 2. Create an Endpoint and perform real-time inference." |
| 252 | + "## 2. Create an Endpoint and perform real-time inference." |
253 | 253 | ]
|
254 | 254 | },
|
255 | 255 | {
|
|
275 | 275 | "cell_type": "markdown",
|
276 | 276 | "metadata": {},
|
277 | 277 | "source": [
|
278 |
| - "#### A. Create an Endpoint" |
| 278 | + "### A. Create an Endpoint" |
279 | 279 | ]
|
280 | 280 | },
|
281 | 281 | {
|
|
304 | 304 | "cell_type": "markdown",
|
305 | 305 | "metadata": {},
|
306 | 306 | "source": [
|
307 |
| - "#### B. Create input payload" |
| 307 | + "### B. Create input payload" |
308 | 308 | ]
|
309 | 309 | },
|
310 | 310 | {
|
|
667 | 667 | "cell_type": "markdown",
|
668 | 668 | "metadata": {},
|
669 | 669 | "source": [
|
670 |
| - "#### C. Perform Real-time inference" |
| 670 | + "### C. Perform Real-time inference" |
671 | 671 | ]
|
672 | 672 | },
|
673 | 673 | {
|
|
739 | 739 | "cell_type": "markdown",
|
740 | 740 | "metadata": {},
|
741 | 741 | "source": [
|
742 |
| - "#### D. Visualize output" |
| 742 | + "### D. Visualize output" |
743 | 743 | ]
|
744 | 744 | },
|
745 | 745 | {
|
|
765 | 765 | "cell_type": "markdown",
|
766 | 766 | "metadata": {},
|
767 | 767 | "source": [
|
768 |
| - "#### E. Delete the endpoint" |
| 768 | + "### E. Delete the endpoint" |
769 | 769 | ]
|
770 | 770 | },
|
771 | 771 | {
|
|
789 | 789 | "cell_type": "markdown",
|
790 | 790 | "metadata": {},
|
791 | 791 | "source": [
|
792 |
| - "### 3. Perform Batch inference" |
| 792 | + "## 3. Perform Batch inference" |
793 | 793 | ]
|
794 | 794 | },
|
795 | 795 | {
|
|
838 | 838 | "cell_type": "markdown",
|
839 | 839 | "metadata": {},
|
840 | 840 | "source": [
|
841 |
| - "#### C. Visualize output" |
| 841 | + "Visualize output" |
842 | 842 | ]
|
843 | 843 | },
|
844 | 844 | {
|
|
879 | 879 | "cell_type": "markdown",
|
880 | 880 | "metadata": {},
|
881 | 881 | "source": [
|
882 |
| - "### 4. Delete the model" |
| 882 | + "## 4. Delete the model" |
883 | 883 | ]
|
884 | 884 | },
|
885 | 885 | {
|
|
902 | 902 | "cell_type": "markdown",
|
903 | 903 | "metadata": {},
|
904 | 904 | "source": [
|
905 |
| - "### 5. Cleanup " |
| 905 | + "## 5. Cleanup " |
906 | 906 | ]
|
907 | 907 | },
|
908 | 908 | {
|
|
0 commit comments